Navigating to partials

Is it possible to navigate to a partial from within a view?
Example:

<h1><%= t("login_name") %></h1>

<%= render partial => "shared/login" %>
<%= t("or") %> <%= link_to t("create_a_new_account"), signup_path %>

Should it not be possible to put your cursor on login in the render partial line above and press CTRL-B to open up the corresponding partial view?  I tried, doesn't work.

Bharat

1 comment
Comment actions Permalink

Hello Bharat,

Is it possible to navigate to a partial from within a view?

Yes, this should work

<%= render partial => "shared/login" %>

In this example partial should be symbol or string. In your case partial is some identifier (method call or local variable or etc). I've check feature on small example and it works in RubyMine 1.1.

# app/views/shared/_login.html.erb
...

# app/views/people/index.html.erb
...
<%= render  :partial => "shared/login" %>

..


 

RubyMine provides resolve(navigation to definition on Ctrl+B) and autocompletion in: ... => "<caret>" %>

0

Please sign in to leave a comment.