RubyMine 7.0.0 Web Help

In this section, you can find some examples of code completion that RubyMine provides for Ruby-on-Rails.

Completing parameters of migration calls

For Ruby on Rails, RubyMine provides resolve and code completion for the parameters of the following migration calls.

  • add_column, remove_column, change_column, change_column_default, rename_column
  • create_table, change_table, drop_table, rename_table
  • add_index, remove_index
  • add_timestamps, remove_timestamps

As you enter parameters, press Ctrl+SpaceCtrl+SpaceCtrl+SpaceCtrl+SpaceAlt+SlashCtrl+SpaceCtrl+Space or Ctrl+Back SlashCtrl+SpaceCtrl+SpaceControl SpaceControl SpaceControl SpaceControl Space, Alt Escape or Shift Space to show the suggestion list. Use Ctrl+PCtrl+PCtrl+PCtrl+PCtrl+PCtrl+PCtrl+PCtrl+PMeta+PCommand PCommand PCommand PCommand P to view which parameter is required.

rails_CodeCompletionMigration.png

Completing parameters of a certain format

Some methods expect parameters of a certain type. RubyMine suggests appropriate options in the suggestion list:

rails_CodeCompletionValidate.png

Creating dynamic queries

When a variable holds a model object, RubyMine suggests suitable code completion:

rails_CodeCompletion.png

Having selected the desired completion, you can create chained queries:

rails_CodeCompletionChainedQuery.png

See Also

Procedures:

Web Resources: