Flowdock
method

source_reflection_names

Importance_1
Ruby on Rails latest stable (v4.0.2) - 0 notes - Class: ActiveRecord::Reflection::ThroughReflection
source_reflection_names() public

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.