Permalink
Browse files

Fix naming conflict with ThinkingSphinx - updatable_attributes

  • Loading branch information...
nilbus committed Aug 11, 2010
1 parent 2870961 commit ce05f5d81e71169add4922d02639ee86c93c5c78
Showing with 3 additions and 2 deletions.
  1. +3 −2 lib/mass_assignment_fu.rb
@@ -82,7 +82,7 @@ def remove_disallowed_attributes_from_mass_assignment(assigned_attributes, expli
safe_attributes += self.class.accessible_attributes unless self.class.accessible_attributes.nil?
safe_attributes = safe_attributes.hashify.stringify
- kept_attributes = updatable_attributes(assigned_attributes, safe_attributes, explicitly_allowed_attributes, nest_level)
+ kept_attributes = attributes_that_can_be_updated(assigned_attributes, safe_attributes, explicitly_allowed_attributes, nest_level)
filtered_attributes = assigned_attributes.keys - kept_attributes.keys
log_protected_attribute_removal(filtered_attributes) if filtered_attributes.any?
@@ -99,7 +99,8 @@ def new_associated_class(association)
private
# Scan through each of the assigned_attributes, and add the allowed ones to the safe list
- def updatable_attributes(assigned_attributes, safe_attributes, explicitly_allowed_attributes, nest_level)
+ # (updatable_attributes is taken by ThinkingSphinx)
+ def attributes_that_can_be_updated(assigned_attributes, safe_attributes, explicitly_allowed_attributes, nest_level)
kept_attributes = {}
assigned_attributes.stringify.each do |key, value|

0 comments on commit ce05f5d

Please sign in to comment.