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


<% module_namespacing do -%>

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

  # GET <%= route_url %>

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?

Screen Shot 2014-03-12 at 23.05.58.jp2.zip
1 comment

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

Regards, Oleg.


Please sign in to leave a comment.