static public Method

Base.controller_name

Converts the class name from something like "OneModule::TwoModule::NeatController" to "neat".

Source Code

# File action_controller/base.rb, line 399
def controller_name
  @controller_name ||= controller_class_name.sub(/Controller$/, '').underscore
end
Comments

Have your say
Please use Textile formatting (click here for a cheat sheet). Use <code/> and <pre/> for code samples.
Click here to login with OpenID to to post comments.