Flowdock
method

middle_reflection

Importance_0
v4.2.7 - Show latest stable - 0 notes - Class: HasAndBelongsToMany
middle_reflection(join_model) public

No documentation

This method has no description. You can help the Ruby on Rails community by adding new notes.

Hide source
# File activerecord/lib/active_record/associations/builder/has_and_belongs_to_many.rb, line 90
    def middle_reflection(join_model)
      middle_name = [lhs_model.name.downcase.pluralize,
                     association_name].join('_').gsub(/::/, '_').to_sym
      middle_options = middle_options join_model
      hm_builder = HasMany.create_builder(lhs_model,
                                          middle_name,
                                          nil,
                                          middle_options)
      hm_builder.build lhs_model
    end
Register or log in to add new notes.