Early Access Program

What’s Mining: Rails 5 Support

Hello everyone,

When we published the post about Ruby timeline and history, we asked all of you about the Ruby and Rails future. And the future seems to have already arrived with Rails 5 RC being around the corner. We have been focusing on Rails 5 support since the first beta was released at the end of December. Today we want to share what has been done and welcome you to try Rails 5 with the latest RubyMine 8.5 EAP build 145.184.

Action Cable

Let’s start with the big new thing, a framework for handling WebSockets called Action Cable. Though the work on the feature is still in process, we have already added the main support, which we want to describe in more detail.

First of all, the Rails channel generator is now available in RubyMine:
action_cable_1

action_cable_2

When created, channels are shown in the Rails Project View with the list of methods:action_cable_3

Code completion can be invoked inside a channel class:action_cable_4

You can also navigate from a channel .coffee file to the corresponding channel class and its methods:action_cable_5

action_cable_6

Renaming refactoring works fine for a channel method even being invoked from a .coffee file:action_cable_7

Rails API

If you use Rails only as a backend in your app, you might be glad that rails-api gem is now included into Rails 5.  So, RubyMine now has a special option when creating a new application:

rails_api

Please note that you can only choose Rails 5+ from the list. The Rails API application does not have views, so RubyMine will not show any view-related actions and icons.

ActiveRecord Changes

Rails 5 brings a bunch of changes for ActiveRecord, and RubyMine adds code insight for all the new methods:

active_record

Rake Commands

Rake commands are now united with Rails commands, so bin/rails is a single master command in Rails 5. But since we feel our users got used to our Tools | Run Rake Task…, and rake commands are still available from there, we have not changed anything yet. We will be glad if you share your thoughts in this issue.

We have some time before the final release, so please help us to make Rails 5 support as good as it could be. Share your ideas and concerns here in the comments or add them to the corresponding issue.

You are more than welcome to try all the new features of the upcoming release by downloading the latest EAP build.


Sincerely yours,
The RubyMine Team

image description