Class: ActiveRecord::Associations::HasManyAssociation

Inherits:
Object
  • Object
show all
Defined in:
lib/activerecord_sortable/has_many_association.rb

Instance Method Summary collapse

Instance Method Details

#original_writerObject



6
# File 'lib/activerecord_sortable/has_many_association.rb', line 6

alias_method :original_writer, :writer

#writer(records) ⇒ Object



8
9
10
11
# File 'lib/activerecord_sortable/has_many_association.rb', line 8

def writer(records)
  original_writer(records)
  sort_entities(records)
end