RubyMine 5.4.3 Web Help

RubyMine suggests two ways of defining actions. First, you can define actions on creating a controller. Alternatively, it is also possible to edit the source code, while enjoying the powerful RubyMine coding assistance features.

To define actions in a controller, do one of the following
  • Create a controller as described in the section Creating Rails Application Elements. In the Add New Controller dialog box, click the Add button, and specify the action names as required.

    ruby_railsCreateAction1.png

  • Open the desired controller in the editor, type the def keyword, then the action name, and press EnterEnterEnterEnterEnterEnterEnterEnterEnterEnterEnterEnterEnter. RubyMine automatically adds the closing end keyword, and marks the new action with the view icon in the left gutter.

    ruby_railsCreateAction2.png

    Tip

    Using private and public modifiers results in hiding or showing view icons in the gutter, and, respectively disabling or enabling creation of views. In the Project tool window, such methods are marked as ruby_methodPrivate.png and ruby_methodPublic.png icons respectively.

See Also

Procedures:

Web Resources: