RubyMine Beginner: How to easily create embedded view templates (html.erb)

I am obviously missing the easy way to create view files (html.erb) after creating methods in my controller.  If I right click on the appropriatley named folder under views and select new, I would expect to see an option for creating view files.  Clearly I am missing something.  What is the easiest way to create these files under the project and rails views?

3 comments
Comment actions Permalink

Hi!

The easiest way to create a view for controller action is to click the gutter icon on the left from the method name (see screenshot below).

http://www.jetbrains.com/ruby/features/screenshots/rails/rails_switch_to_view.PNG
It takes you to the corresponding view file or, if the view does not exist, it suggest creating it

Hope it helps
-Eugene

0
Comment actions Permalink

For what it's worth, in the interest of being intuitive, I think it would be nice to have a template for "View" under the New menu.  I did the same thing that gemini929 described and was surprised not to find that option.  For those of us who can be more productive with keyboard shortcuts, it would additionally be nice if there was a keyboard shortcut that works.  The tooltip for the icon says "Alt-Shift-N" works, but when I do that, the option for a view is disabled, so it won't generate the view using "Alt-Shift-N".  Only if I click the icon.

0
Comment actions Permalink

Hi guys,

Sounds reasonable, please submit an issue - http://youtrack.jetbrains.net/issues/RUBY

0

Please sign in to leave a comment.