Skip to content

Commit

Permalink
present? is better here
Browse files Browse the repository at this point in the history
  • Loading branch information
spastorino committed Nov 11, 2010
1 parent c636005 commit b734e19
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion activerecord/lib/active_record/nested_attributes.rb
Expand Up @@ -323,7 +323,7 @@ def assign_nested_attributes_for_one_to_one_association(association_name, attrib
(options[:update_only] || record.id.to_s == attributes['id'].to_s) (options[:update_only] || record.id.to_s == attributes['id'].to_s)
assign_to_or_mark_for_destruction(record, attributes, options[:allow_destroy]) unless call_reject_if(association_name, attributes) assign_to_or_mark_for_destruction(record, attributes, options[:allow_destroy]) unless call_reject_if(association_name, attributes)


elsif !attributes['id'].blank? elsif attributes['id'].present?
raise_nested_attributes_record_not_found(association_name, attributes['id']) raise_nested_attributes_record_not_found(association_name, attributes['id'])


elsif !reject_new_record?(association_name, attributes) elsif !reject_new_record?(association_name, attributes)
Expand Down

0 comments on commit b734e19

Please sign in to comment.