Looking to add the ability to do the following
class App < ActiveRecord::Base
belongs_to :client
has_many :users, :through => :client
end
class Client < ActiveRecord::Base
has_many :apps
has_many :users
end
class User < ActiveRecord::Base
belongs_to :client
end
currently results in SQL of "WHERE clients.client_id = #{@owner.id}"
needs to produce SQL of "WHERE clients.id = #{@owner.client_id}"
David Genord II