Search code examples
ruby-on-railsrubymine

RubyMine 2016: Navigate from route to controller action?


In RubyMine 2016, is there a way to navigate from a route to a controller action? I see a friend doing something similar in PyCharm with Cmd+B but I can't make it work in RubyMine.

Also refactoring a controller action in RubyMine won't rename the name of the method in the route. PyCharm seems to work flawlessly with Python.

So I have these routes

root 'application#hello'
get '/goodbye' => 'application#goodbye'

When I position my cursor on #hello (root route) and hit Cmd+B it should go to the application_controller.rb action "hello":

def hello
  # render text: "Hey kumpel"
  render({:text => "Hey kumpel"})
end

But I get the message "Cannot find declaration to go to".


Solution

  • install Railways plugin. It does exactly what you want