Method: AbstractController::Base.controller_path
- Defined in:
- lib/abstract_controller/base.rb
.controller_path ⇒ Object
Returns the full controller name, underscored, without the ending Controller. For instance, MyApp::MyPostsController would return “my_app/my_posts” for controller_name.
Returns
-
string
90 91 92 |
# File 'lib/abstract_controller/base.rb', line 90 def controller_path @controller_path ||= name.sub(/Controller$/, '').underscore unless anonymous? end |