diff options
author | Yehuda Katz + Carl Lerche <ykatz+clerche@engineyard.com> | 2009-04-30 15:13:40 -0700 |
---|---|---|
committer | Yehuda Katz + Carl Lerche <ykatz+clerche@engineyard.com> | 2009-05-01 17:31:02 -0700 |
commit | 4ee3e5b094463383891789f484e927b19fccc744 (patch) | |
tree | 4595acf5dc068ebad2f796992d12659d65460337 /actionpack/lib/action_controller/new_base | |
parent | d58b57a3caf4ad434c2be4f63eecd9a1921c7c4a (diff) | |
download | rails-4ee3e5b094463383891789f484e927b19fccc744.tar.gz rails-4ee3e5b094463383891789f484e927b19fccc744.tar.bz2 rails-4ee3e5b094463383891789f484e927b19fccc744.zip |
Ported over the concept of public instance methods on controller child classes as callable action methods
Diffstat (limited to 'actionpack/lib/action_controller/new_base')
-rw-r--r-- | actionpack/lib/action_controller/new_base/base.rb | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/actionpack/lib/action_controller/new_base/base.rb b/actionpack/lib/action_controller/new_base/base.rb index 9f7a148b3c..00d161289e 100644 --- a/actionpack/lib/action_controller/new_base/base.rb +++ b/actionpack/lib/action_controller/new_base/base.rb @@ -1,5 +1,6 @@ module ActionController class Http < AbstractController::Base + abstract! # :api: public attr_internal :request, :response, :params @@ -19,18 +20,15 @@ module ActionController # :api: public def controller_path() self.class.controller_path end - - # :api: private - def self.action_methods - @action_names ||= Set.new(self.public_instance_methods - self::CORE_METHODS) + + # :api: private + def self.internal_methods + ActionController::Http.public_instance_methods(true) end # :api: private def self.action_names() action_methods end - # :api: private - def action_methods() self.class.action_names end - # :api: private def action_names() action_methods end @@ -44,7 +42,7 @@ module ActionController def call(env) @_request = ActionDispatch::Request.new(env) @_response = ActionDispatch::Response.new - process(@_request.parameters[:action]) + process(@_request.parameters[:action].to_sym) @_response.body = response_body @_response.prepare! self |