diff options
Diffstat (limited to 'activerecord/lib/active_record/associations/builder/singular_association.rb')
-rw-r--r-- | activerecord/lib/active_record/associations/builder/singular_association.rb | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/activerecord/lib/active_record/associations/builder/singular_association.rb b/activerecord/lib/active_record/associations/builder/singular_association.rb index d97c0e9afd..10d568ebc0 100644 --- a/activerecord/lib/active_record/associations/builder/singular_association.rb +++ b/activerecord/lib/active_record/associations/builder/singular_association.rb @@ -6,13 +6,9 @@ module ActiveRecord::Associations::Builder super + [:remote, :dependent, :counter_cache, :primary_key, :inverse_of] end - def constructable? - true - end - - def define_accessors(model) + def define_accessors(model, reflection) super - define_constructors(model.generated_feature_methods) if constructable? + define_constructors(model.generated_feature_methods) if reflection.constructable? end # Defines the (build|create)_association methods for belongs_to or has_one association |