diff options
author | Jeremy Kemper <jeremy@bitsweat.net> | 2007-10-07 22:39:44 +0000 |
---|---|---|
committer | Jeremy Kemper <jeremy@bitsweat.net> | 2007-10-07 22:39:44 +0000 |
commit | 00d9f58f29ad2bd072276f6b3d63ed9df71bdcad (patch) | |
tree | fb179458dfcad67ef87c728fce3dbcbaa99fae6e /railties | |
parent | bd087e6716f8b48d48386c3d42e529849d7b68cd (diff) | |
download | rails-00d9f58f29ad2bd072276f6b3d63ed9df71bdcad.tar.gz rails-00d9f58f29ad2bd072276f6b3d63ed9df71bdcad.tar.bz2 rails-00d9f58f29ad2bd072276f6b3d63ed9df71bdcad.zip |
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
Diffstat (limited to 'railties')
-rw-r--r-- | railties/lib/initializer.rb | 4 |
1 files changed, 3 insertions, 1 deletions
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 |