Method: ApplicationRecord.numbered
- Defined in:
- app/models/application_record.rb
.numbered(*associations) ⇒ Object
90 91 92 93 94 95 96 97 98 99 |
# File 'app/models/application_record.rb', line 90 def self.numbered(*associations) class_eval do associations.each do |it| define_method("#{it}=") do |e| e.merge_numbers! super(e) end end end end |