Inconsistent behavior in the views file
Please look at the following code snippet in a views partial labeled _js_head.html.erb in my project:
<% content_for :head do %>
<%= stylesheet_link_tag '/javascripts/jsTree/source/tree_component.css' %>
<%= javascript_include_tag 'jsTree/source/_lib.js' %>
<%= javascript_include_tag 'jsTree/source/tree_component.js' %>
<%= javascript_include_tag 'jquery.alerts/jquery.alerts.js' %>
<%= stylesheet_link_tag '/javascripts/jquery.alerts/jquery.alerts.css' %>
<%= stylesheet_link_tag '/javascripts/jquery.alerts/jquery.alerts.spree.css' %>
<%= javascript_tag "var AUTH_TOKEN = #{form_authenticity_token.inspect};" if protect_against_forgery? %>
<%= javascript_tag "var practice_id = #{current_practice.id}" %>
<%= javascript_include_tag 'folders_tree.js' %>
<% end %>
Rubymine has trouble resolving a javascript_include_tag file that has the file name extension ".js" attached to it. If you omit the extension, it has no problems, and F4 will load the referenced file. The stylesheet_link_tag does not have this problem.
Bharat
请先登录再写评论。
Hey Guys (Oleg/Roman),
Where are you? I have never seen you not respond to posts promptly. If you are working on releasing 1.1.1 then you are excused
Bharat
Hello Bharat,
".js" extension here is optional and if your remove it RM wont show warning. But obviously you are right and it is a bug, so I've filled an issue - http://www.jetbrains.net/jira/browse/RUBY-4426
Yes, we are