RubyMine Rails-specific Code Completion

And finally, the Rails! Rails is probably why most of us is using Ruby, right? So, RubyMine helps coding when Ruby on Rails is used.

Ruby on Rails Smartness #1

When a variable holds a model object RubyMine knows its type, its details and wisely offers the code completion.

And once you select first attribute to find_by you can try once again and RubyMine suggests again to create a complex find statement.

Ruby on Rails Smartness #2

Many Rails methods expect parameters of a certain kind or format. One example of such methods is validation methods (validate_uniqueness_of, validates_numericality_of, etc.).

RubyMine knows what should be in completion list after such methods, finds and suggests appropriate names.

Ruby on Rails Smartness #3

Quite often methods take hashes as parameters with only certain key values, ignoring the others.

class AdminController :index, :partial => ‘bye’

def index



Some parameters of render hash in a controller are :partial, :action, :layout and :template.

When these are used the right part of the hash is clear.

For :partial it is partial view,

For :action — the action from the controller or its parent.

For other supported parameters check the documentation.

This entry was posted in Feature and tagged , . Bookmark the permalink.

4 Responses to RubyMine Rails-specific Code Completion

  1. Nicholas F says:


    Just wondering if you guys can link to the forums from this blog – I keep landing back here from my RSS feed and want to click into the forums but can’t.

    Or am I missing the link?

    Nicholas F.

  2. Stefan says:

    This is hot stuff. As a never-satisfied customer have you considered adding rails documentation to the hash keys and valid options? Hop on the steroids, RubyMine!

  3. Oleg Shpynov says:

    Hello Stefan,

    Sounds great!
    I`ve create an issue on this:


  4. @Nicholas F: A brilliant idea!
    I added the links to the sidebar.


Leave a Reply

Your email address will not be published. Required fields are marked *