• Glen Crawford

    Creating custom helper methods for the Rails console

    By Glen Crawford,

    When working in the Rails console, I tend to build up commands over time that I run often. These might be for resetting data, fetching something from an API, generating tokens, etc. Multiple times a day, I find myself holding down the up arrow on the keyboard until I find the last time I ran it, so I can run it again. Usually, there will be multiple commands that need to be run in sequence, which get concatenated together with semi-colons so they can all be run in one go. I don't know for sure, but I imagine every developer does this.

    As an example, right now I'm working on a project that calls a large number of API endpoints on various different microservices. These all require authentication via a JWT token. We use Her (an ORM for making requests to REST APIs and representing their responses with Ruby classes and objects). We have some Faraday middleware that adds the JWT token (stored in RequestLocals) to the Authorization header to authenticate the requests with the microservices. This means that when I am testing these API calls in the Rails console, I need to fetch a JWT and store it in RequestLocals.

  • Tianwen Chen

    Wallaby: a newcomer in the admin interface market

    By Tianwen Chen,

    Are you struggling to choose between ActiveAdmin and Rails Admin? Just to confuse you further, there is now a third option:

    So, apart from an admin interface, what is Wallaby? The core design is that:

  • Stephen Huang

    ActionCable for Rails and Angular JS 1.x

    By Stephen Huang,

    Action Cable is an awesome feature that uses Web Sockets to realise a real time application in Rails, and includes both the back-end and the front-end. In this article, we will use only the server side of Action Cable in Rails and client-side in AngularJS 1.x. This is not a step-by-step tutorial, but it is intended to help you to understand the purpose of each step.

    The first thing we need to do is enable Action Cable in our back-end app. The simplest way is to mount action cable in the route:

  • Sameera Gayan

    What constitutes good testing in Rails?

    By Sameera Gayan,

    Recently, our founder and CEO, Mikel Lindsaar spoke at the Ruby Developer Summit on Standard Development. He discussed the role of testing in project work, and talked about when you should follow the textbook approach and when it might be better to relax those rules. You can watch his talk on our youtube channel.

    This blog post details my thoughts on how to approach writing tests. To illustrate, I'll be using a Ruby/Rails example as Rails is a framework that embraces the culture of testing. However, I believe these concepts can be adapted to any language.

  • Rachelle LeQuesne

    What do I do now? How to kickstart your new career as a Developer.

    By Rachelle LeQuesne,

    One of the questions I often get asked after an Installfest or a Rails Girls event is “What do I do now?”

    It’s a difficult question to answer comprehensively and succinctly in that moment. The answer may also vary with the relative skill of the person asking.

  • Riana Ferreira

    How to toe the line with RSpec, Stubs, and RuboCop

    By Riana Ferreira,

    Recently I set up the Rubocop gem for a project. I wanted to use it to ​ensure that my code base aligned with the community Ruby Style Guide. When I ran the tool, I came up against the following error message:

    This message didn't give me any idea of what the problem was, nor what I should do to avoid it in the future.

  • reinteractive

    Some Quick Tips for Tips for Testing Your Rails App

    By reinteractive,

    by Leo Liang

    There might be times when you need to mock a certain value for ENV without overriding other values. This can be easily achieved as follows:

  • reinteractive

    Some Quick Tips for Tips for Testing Your Rails App

    By reinteractive,

    by Leo Liang

    There might be times when you need to mock a certain value for ENV without overriding other values. This can be easily achieved as follows:

  • Mikel Lindsaar

    RubyTogether and reinteractive

    By Mikel Lindsaar,

    Today reinteractive took an important step in our support of the Ruby Community by becoming the world's first Ruby Member of the RubyTogether project representing a $60,000 USD donation to this open source project annually.

    I'm very proud that we are able to do this.

  • Mark Biegel

    Making iOS & Android apps with Rails & Turbolinks

    By Mark Biegel,

    So you want to build an app? One of the first decisions that needs to be made is one of time and resources. For a business, it is crucial to know your market in order to successfully launch your product. But what about the App market? Which platform you do you choose to launch to first? Apple? Android? Web?

    At this point you might have already considered a HTML5 web app so you can be cross platform and launch to everyone. Or perhaps you decided against it, due to poor performance and not having a “native app” feel.