method

middle_options

Importance_0
v5.0.0.1 - Show latest stable - 0 notes - Class: HasAndBelongsToMany
middle_options(join_model) private

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 106
    def middle_options(join_model)
      middle_options = {}
      middle_options[:class_name] = "#{lhs_model.name}::#{join_model.name}"
      middle_options[:source] = join_model.left_reflection.name
      if options.key? :foreign_key
        middle_options[:foreign_key] = options[:foreign_key]
      end
      middle_options
    end
Register or log in to add new notes.