method

middle_options

Importance_0
v7.0.0 - 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 75
      def middle_options(join_model)
        middle_options = {}
        middle_options[:class_name] = "#{lhs_model.name}::#{join_model.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.