aboutsummaryrefslogtreecommitdiffstats
path: root/actionwebservice/lib/action_web_service/container/action_controller_container.rb
diff options
context:
space:
mode:
authorLeon Breedt <bitserf@gmail.com>2005-06-25 18:06:52 +0000
committerLeon Breedt <bitserf@gmail.com>2005-06-25 18:06:52 +0000
commit07f237bdae9051cfc5bd38d7608f7a63de54e01b (patch)
treefaab90fe586da2645968064a509399cbe9394042 /actionwebservice/lib/action_web_service/container/action_controller_container.rb
parent302c23d5a6c1df4a5a9f373e545db5f8a894bdd6 (diff)
downloadrails-07f237bdae9051cfc5bd38d7608f7a63de54e01b.tar.gz
rails-07f237bdae9051cfc5bd38d7608f7a63de54e01b.tar.bz2
rails-07f237bdae9051cfc5bd38d7608f7a63de54e01b.zip
clean up cases where we override #inherited
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1511 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'actionwebservice/lib/action_web_service/container/action_controller_container.rb')
-rw-r--r--actionwebservice/lib/action_web_service/container/action_controller_container.rb16
1 files changed, 8 insertions, 8 deletions
diff --git a/actionwebservice/lib/action_web_service/container/action_controller_container.rb b/actionwebservice/lib/action_web_service/container/action_controller_container.rb
index 06b47e9d79..d5afff09bb 100644
--- a/actionwebservice/lib/action_web_service/container/action_controller_container.rb
+++ b/actionwebservice/lib/action_web_service/container/action_controller_container.rb
@@ -2,13 +2,13 @@ module ActionWebService # :nodoc:
module Container # :nodoc:
module ActionController # :nodoc:
def self.append_features(base) # :nodoc:
- base.class_eval do
- class << self
- alias_method :inherited_without_api, :inherited
- alias_method :web_service_api_without_require, :web_service_api
- end
+ class << base
+ include ClassMethods
+ alias_method :inherited_without_api, :inherited
+ alias_method :inherited, :inherited_with_api
+ alias_method :web_service_api_without_require, :web_service_api
+ alias_method :web_service_api, :web_service_api_with_require
end
- base.extend(ClassMethods)
end
module ClassMethods
@@ -43,7 +43,7 @@ module ActionWebService # :nodoc:
end
end
- def web_service_api(definition=nil) # :nodoc:
+ def web_service_api_with_require(definition=nil) # :nodoc:
return web_service_api_without_require if definition.nil?
case definition
when String, Symbol
@@ -82,7 +82,7 @@ module ActionWebService # :nodoc:
end
private
- def inherited(child)
+ def inherited_with_api(child)
inherited_without_api(child)
begin child.web_service_api(child.controller_path)
rescue MissingSourceFile => e