Module: M2MFastInsert::HasAndBelongsToManyOverride
- Defined in:
- lib/m2m_fast_insert/has_and_belongs_to_many_override.rb
Instance Method Summary collapse
-
#has_and_belongs_to_many(name, *options) ⇒ Object
Decorate the original habtm to call our method definition.
Instance Method Details
#has_and_belongs_to_many(name, *options) ⇒ Object
Decorate the original habtm to call our method definition
name - Plural name of the model we’re associating with options - see ActiveRecord docs. Rails 4+ allows an optional proc in addition to the params
7 8 9 10 11 |
# File 'lib/m2m_fast_insert/has_and_belongs_to_many_override.rb', line 7 def has_and_belongs_to_many(name, *) super = .last.is_a?(Hash) ? .last : {} define_fast_methods_for_model(name, ) end |