I am trying to figure out how to put Ruby code into a HAML file so I can determine which controller the request came through, and set some appropriate settings.
I added this code to the top of the file:
ruby:
active_is = "#{request[:controller]}/#{action_name}"
But it crashed with the error saying:
Illegal nesting: nesting within plain text is illegal.
Does that mean that my syntax is off? How do I fix this?
Thanks!
Language filters are preceded by the colon, not the reverse:
More often than not, though, it’s easier to just use
-: