Editing Ruby Templates

I am working my way through Crafting Rails for Rails 4. Most of the examples are plugins. In Chapter 6 I am trying to create a new scaffold template for a controller and it contains code like this

controller.rb

<% module_namespacing do -%>

class <%= controller_class_name %> Controller < ApplicationController
  before_action :set_<%= singular_table_name %>, only: [:show, :edit, :update, :destroy]

  # GET <%= route_url %>
etc....

This seems to completely upset the code inspection and formatting ( the <%'s in particular ). It looks like the screen shor attached.

Anyone know of a way to make ruby mine approach the code inspection and formatting properly?



Attachment(s):
Screen Shot 2014-03-12 at 23.05.58.jp2.zip
0
1 comment

Unfortunately RubyMine doesn't support .rb.erb templates :(

Regards, Oleg.

0

Please sign in to leave a comment.