diff options
author | Joshua Peek <josh@joshpeek.com> | 2009-05-07 10:45:29 -0500 |
---|---|---|
committer | Joshua Peek <josh@joshpeek.com> | 2009-05-07 10:45:29 -0500 |
commit | a747ab5b20b9d543e9d311070e3b720c761ae716 (patch) | |
tree | c8e671f1f6a722b56d5ca005977fbe2e210ffda5 /actionpack/lib/action_controller/abstract/base.rb | |
parent | af40fa6d036d86895e7be4ef46a615d44eb41ede (diff) | |
download | rails-a747ab5b20b9d543e9d311070e3b720c761ae716.tar.gz rails-a747ab5b20b9d543e9d311070e3b720c761ae716.tar.bz2 rails-a747ab5b20b9d543e9d311070e3b720c761ae716.zip |
Whitespace!
Diffstat (limited to 'actionpack/lib/action_controller/abstract/base.rb')
-rw-r--r-- | actionpack/lib/action_controller/abstract/base.rb | 19 |
1 files changed, 8 insertions, 11 deletions
diff --git a/actionpack/lib/action_controller/abstract/base.rb b/actionpack/lib/action_controller/abstract/base.rb index ade7719cc0..39e9ad0440 100644 --- a/actionpack/lib/action_controller/abstract/base.rb +++ b/actionpack/lib/action_controller/abstract/base.rb @@ -1,41 +1,38 @@ module AbstractController class Base - attr_internal :response_body attr_internal :response_obj attr_internal :action_name - + def self.process(action) new.process(action) end - + def self.inherited(klass) end - + def initialize self.response_obj = {} end - + def process(action_name) unless respond_to_action?(action_name) raise ActionNotFound, "The action '#{action_name}' could not be found" end - + @_action_name = action_name process_action self.response_obj[:body] = self.response_body self end - + private - def process_action respond_to?(action_name) ? send(action_name) : send(:action_missing, action_name) end - + def respond_to_action?(action_name) respond_to?(action_name) || respond_to?(:action_missing, true) end - end -end
\ No newline at end of file +end |