class Profile < ActiveRecord::Base
belongs_to :license
has_many :offers, :through => :application
has_one :application, :through => :license
end
I ran Profile.first.offers
and got
PGError: ERROR: column applications.profile_id does not exist
LINE 1: ...ffers".application_id = "applications".id WHERE (("applicati...
^
: SELECT "offers".* FROM "offers" INNER JOIN "applications" ON "offers".application_id = "applications".id WHERE (("applications".profile_id = 1))