Search code examples
rubymine

RubyMine feature that records actions


Does RubyMine have a feature that allows me to record a specific function in a webpage, and once I have completed those steps, I can review the ruby code that it used? I often find it time consuming to identify an element to click (checkbox, buttons, etc).


Solution

  • Reviewing all code that runs during a specific action is I guess possible only with debugger.

    If you only wanted to know which template a given action (link, button) is in, have a look at the xray-rails gem. The gem shows you the name of the template right in your browser when you press a magic key. You can also click through the template name to open it in the editor right away.

    The template is usually a good starting point for further investigation: in RubyMine you can click on the icon at the top of the left gutter to get to the parent view or the corresponding controller action (see gutter icons navigation help).