Class: ActiveRecord::ReadOnlyAssociation

Inherits:
ActiveRecordError
  • Object
show all
Defined in:
lib/active_record/associations.rb

Overview

:nodoc:

Instance Method Summary collapse

Constructor Details

#initialize(reflection) ⇒ ReadOnlyAssociation

Returns a new instance of ReadOnlyAssociation.



60
61
62
# File 'lib/active_record/associations.rb', line 60

def initialize(reflection)
  super("Can not add to a has_many :through association.  Try adding to #{reflection.through_reflection.name.inspect}.")
end