Skip to content

Commit

Permalink
Merge pull request rails#7697 from guilleiguaran/minor-ar-cleanups
Browse files Browse the repository at this point in the history
Minor cleanups missed during mass assignment options removal from AR
  • Loading branch information
carlosantoniodasilva committed Sep 19, 2012
2 parents 731d809 + 26266cc commit 8b2cbb3
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions activerecord/lib/active_record/nested_attributes.rb
Original file line number Diff line number Diff line change
Expand Up @@ -320,7 +320,7 @@ def _destroy
# If the given attributes include a matching <tt>:id</tt> attribute, or
# update_only is true, and a <tt>:_destroy</tt> key set to a truthy value,
# then the existing record will be marked for destruction.
def assign_nested_attributes_for_one_to_one_association(association_name, attributes, assignment_opts = {})
def assign_nested_attributes_for_one_to_one_association(association_name, attributes)
options = self.nested_attributes_options[association_name]
attributes = attributes.with_indifferent_access

Expand Down Expand Up @@ -469,9 +469,5 @@ def call_reject_if(association_name, attributes)
def raise_nested_attributes_record_not_found(association_name, record_id)
raise RecordNotFound, "Couldn't find #{self.class.reflect_on_association(association_name).klass.name} with ID=#{record_id} for #{self.class.name} with ID=#{id}"
end

def unassignable_keys(assignment_opts)
UNASSIGNABLE_KEYS
end
end
end

0 comments on commit 8b2cbb3

Please sign in to comment.