aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack
diff options
context:
space:
mode:
authorDavid Heinemeier Hansson <david@loudthinking.com>2005-04-02 09:29:43 +0000
committerDavid Heinemeier Hansson <david@loudthinking.com>2005-04-02 09:29:43 +0000
commit7c8d2f28e16958b16812b5fef3d7eca8b640e445 (patch)
treecddf56dc4b0fb169d6e4f48e359e4a91915f8feb /actionpack
parentc788bcb416f4487f99a9e5dacf9a48623412b034 (diff)
downloadrails-7c8d2f28e16958b16812b5fef3d7eca8b640e445.tar.gz
rails-7c8d2f28e16958b16812b5fef3d7eca8b640e445.tar.bz2
rails-7c8d2f28e16958b16812b5fef3d7eca8b640e445.zip
Removed broken attempt to DRY module ClassMethod #970
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1069 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'actionpack')
-rw-r--r--actionpack/lib/action_controller/scaffolding.rb5
-rw-r--r--actionpack/lib/action_controller/verification.rb5
-rw-r--r--actionpack/test/controller/active_record_assertions_test.rb2
3 files changed, 11 insertions, 1 deletions
diff --git a/actionpack/lib/action_controller/scaffolding.rb b/actionpack/lib/action_controller/scaffolding.rb
index ac5b68b4e3..4faa23cdf3 100644
--- a/actionpack/lib/action_controller/scaffolding.rb
+++ b/actionpack/lib/action_controller/scaffolding.rb
@@ -1,5 +1,10 @@
module ActionController
module Scaffolding # :nodoc:
+ def self.append_features(base)
+ super
+ base.extend(ClassMethods)
+ end
+
# Scaffolding is a way to quickly put an Active Record class online by providing a series of standardized actions
# for listing, showing, creating, updating, and destroying objects of the class. These standardized actions come
# with both controller logic and default templates that through introspection already know which fields to display
diff --git a/actionpack/lib/action_controller/verification.rb b/actionpack/lib/action_controller/verification.rb
index e65610f5ec..b0f5236adf 100644
--- a/actionpack/lib/action_controller/verification.rb
+++ b/actionpack/lib/action_controller/verification.rb
@@ -27,6 +27,11 @@ module ActionController #:nodoc:
# :redirect_to => :category_url
#
module Verification
+ def self.append_features(base) #:nodoc:
+ super
+ base.extend(ClassMethods)
+ end
+
module ClassMethods
# Verify the given actions so that if certain prerequisites are not met,
# the user is redirected to a different action. The +options+ parameter
diff --git a/actionpack/test/controller/active_record_assertions_test.rb b/actionpack/test/controller/active_record_assertions_test.rb
index 49db40c5a2..9b504c1f39 100644
--- a/actionpack/test/controller/active_record_assertions_test.rb
+++ b/actionpack/test/controller/active_record_assertions_test.rb
@@ -120,7 +120,7 @@ if Object.const_defined?("ActiveRecord") || File.exist?(path_to_ar)
end
end
- rescue SqliteError => e
+ rescue Object => e
puts "Skipping active record based tests"
puts e.message
end