Method: CrailsDestroyPreparator#has_many
- Defined in:
- lib/metarecord/generators/crails/destroy_generator.rb
#has_many(type, name, options = {}) ⇒ Object
16 17 18 19 20 21 22 23 24 |
# File 'lib/metarecord/generators/crails/destroy_generator.rb', line 16 def has_many type, name, = {} unless [:dependent].nil? @data[type] ||= [] @data[type] << ({ type: "has_many", class: @model[:classname], field: name, options: }) end end |