diff options
Diffstat (limited to 'activerecord/lib/active_record/associations/builder/belongs_to.rb')
-rw-r--r-- | activerecord/lib/active_record/associations/builder/belongs_to.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/associations/builder/belongs_to.rb b/activerecord/lib/active_record/associations/builder/belongs_to.rb index 50a1c39ccf..2b9dd8aae8 100644 --- a/activerecord/lib/active_record/associations/builder/belongs_to.rb +++ b/activerecord/lib/active_record/associations/builder/belongs_to.rb @@ -121,7 +121,7 @@ module ActiveRecord::Associations::Builder # :nodoc: def self.add_default_callbacks(model, reflection) model.before_validation lambda { |o| - o.association(reflection.name).default o.instance_exec(&reflection.options[:default]) + o.association(reflection.name).default(&reflection.options[:default]) } end |