present? is better here

This commit is contained in:
Santiago Pastorino 2010-11-11 18:59:54 -02:00
parent c63600576a
commit b734e192a7

@ -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)
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'])
elsif !reject_new_record?(association_name, attributes)