CoffeeScript Code Formatting in ERB?
Hi,
I use coffeebeans gem to use "coffeescript_tag" helper.
I wrote such as below:
<%= coffee_script_tag do %> $ -> $('#work_task_form_customer_id').change -> $.getJSON ' <% front_shops_path %>?customer_id=' + $(@).val(), (json) -> alert json <% end %>
But the RubyMine code formatter re-format this:
<%= coffee_script_tag do %> $ -> $('#work_task_form_customer_id').change -> $.getJSON ' <% front_shops_path %>?customer_id=' + $(@).val(), (json) -> alert json <% end %>
Does anyone has a solution to recognize RubyMine that is CoffeeScript?
If you think that I shouldn't write javascript/coffeescript code in HTML but Rails routing (front_shops_path likes above) does not work in assets directory.
Thanks.
请先登录再写评论。