Can i know the name of my current controller in my views?

The current controller is always in the "@controller" variable, so:


  If you want the name as a string. If you just want to test if the
controller is a certain type use the "===" operator instead, eg;

  if WidgetController === @controller
     # running under widgetcontroller
    # ...


umm.... controller.controller_name might be a better solution.

for FooController you get 'foo'