diff options
author | Jeremy Kemper <jeremy@bitsweat.net> | 2006-08-05 01:56:58 +0000 |
---|---|---|
committer | Jeremy Kemper <jeremy@bitsweat.net> | 2006-08-05 01:56:58 +0000 |
commit | 12ab93b72b4f98fb2e6ce9102ff9fb2cdb6c992b (patch) | |
tree | 59ad24583f5ec735f2c569d043d37d1c65006459 /actionpack/lib/action_controller | |
parent | 604eb8ab9555da2c539fa8448625593013de3a00 (diff) | |
download | rails-12ab93b72b4f98fb2e6ce9102ff9fb2cdb6c992b.tar.gz rails-12ab93b72b4f98fb2e6ce9102ff9fb2cdb6c992b.tar.bz2 rails-12ab93b72b4f98fb2e6ce9102ff9fb2cdb6c992b.zip |
Make controller_path available as an instance method. Closes #5724.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4664 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'actionpack/lib/action_controller')
-rwxr-xr-x | actionpack/lib/action_controller/base.rb | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/actionpack/lib/action_controller/base.rb b/actionpack/lib/action_controller/base.rb index fd284ae72b..339c0ceb11 100755 --- a/actionpack/lib/action_controller/base.rb +++ b/actionpack/lib/action_controller/base.rb @@ -498,6 +498,11 @@ module ActionController #:nodoc: def controller_name self.class.controller_name end + + # Converts the class name from something like "OneModule::TwoModule::NeatController" to "one_module/two_module/neat". + def controller_path + self.class.controller_path + end def session_enabled? request.session_options[:disabled] != false |