Permalink
Browse files

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
  • Loading branch information...
1 parent bd087e6 commit 00d9f58f29ad2bd072276f6b3d63ed9df71bdcad @jeremy jeremy committed Oct 7, 2007
Showing with 3 additions and 1 deletion.
  1. +3 −1 railties/lib/initializer.rb
@@ -304,7 +304,9 @@ def initialize_whiny_nils
# 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

0 comments on commit 00d9f58

Please sign in to comment.