I have a self-join through the intersection table in the application I'm working on, as shown below.
class User < ActiveRecord::Base
has_many :clients, :through => :client_relationships, :conditions => "approved='1'", :source=>:user
end
It works in the sense that I can say @ current_user.clients and get all clients. However, I would like to set up URLs / clients where I can list all current clients clients. Does anyone know how I can do this?
I tried to configure the resource: clients on my routes and the client controller, but since there is no client model, this also causes errors.
source
share