aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord
diff options
context:
space:
mode:
authorSantiago Pastorino <santiago@wyeworks.com>2010-11-11 18:59:54 -0200
committerSantiago Pastorino <santiago@wyeworks.com>2010-11-11 19:00:33 -0200
commitb734e192a70d63b4420a96a00e4f181d27e30129 (patch)
treea21ca72fd160464db74c6cc4efe729685e738a56 /activerecord
parentc63600576a7ca63d1a7243308ca8cc7f0e3cde75 (diff)
downloadrails-b734e192a70d63b4420a96a00e4f181d27e30129.tar.gz
rails-b734e192a70d63b4420a96a00e4f181d27e30129.tar.bz2
rails-b734e192a70d63b4420a96a00e4f181d27e30129.zip
present? is better here
Diffstat (limited to 'activerecord')
-rw-r--r--activerecord/lib/active_record/nested_attributes.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/nested_attributes.rb b/activerecord/lib/active_record/nested_attributes.rb
index fb48459b6f..0c3392263a 100644
--- a/activerecord/lib/active_record/nested_attributes.rb
+++ b/activerecord/lib/active_record/nested_attributes.rb
@@ -323,7 +323,7 @@ module ActiveRecord
(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)