Understanding :source option of has_one/has_many through of Rails

Please help me in understanding the :source option of has_one/has_many :through association. The Rails API explanation makes very little sense to me.

“Specifies the source association name used by has_many :through =>
:queries
. Only use it if the name cannot be inferred from the
association. has_many :subscribers, :through => :subscriptions will
look for either :subscribers or :subscriber on Subscription,
unless a :source is given. “

3 Answers
3

Leave a Comment