Exception: ActiveRecord::ReadOnlyAssociation

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

Overview

:nodoc:

Instance Method Summary collapse

Constructor Details

#initialize(reflection) ⇒ ReadOnlyAssociation

Returns a new instance of ReadOnlyAssociation.



89
90
91
# File 'activerecord/lib/active_record/associations.rb', line 89

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