From 00d9f58f29ad2bd072276f6b3d63ed9df71bdcad Mon Sep 17 00:00:00 2001 From: Jeremy Kemper Date: Sun, 7 Oct 2007 22:39:44 +0000 Subject: [PATCH] Use a configuration check so ActiveRecord can be omitted. References #9699. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7781 5ecf4fe2-1ee6-0310-87b1-e25e094e27de --- railties/lib/initializer.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/railties/lib/initializer.rb b/railties/lib/initializer.rb index b2a405d268..0819aa1cc1 100644 --- a/railties/lib/initializer.rb +++ b/railties/lib/initializer.rb @@ -304,7 +304,9 @@ module Rails # Sets +ActiveRecord::Base#whiny_protected_attributes+ which determines whether to # raise on mass-assigning attributes protected with +attr_protected+/+attr_accessible+. def initialize_whiny_protected_attributes - ActiveRecord::Base.whiny_protected_attributes = configuration.whiny_protected_attributes + if configuration.frameworks.include?(:active_record) + ActiveRecord::Base.whiny_protected_attributes = configuration.whiny_protected_attributes + end end def initialize_temporary_directories