method

source_reflection_names

Importance_1
v7.1.3.4 - Show latest stable - 0 notes - Class: ActiveRecord::Reflection::AssociationReflection
source_reflection_names() private

Gets an array of possible :through source reflection names in both singular and plural form.

class Post < ActiveRecord::Base
  has_many :taggings
  has_many :tags, through: :taggings
end

tags_reflection = Post.reflect_on_association(:tags)
tags_reflection.source_reflection_names
# => [:tag, :tags]
Show source
Register or log in to add new notes.