I have a self join through an intersect table in an app I'm working on like below.
class User < ActiveRecord::Base
has_many :clients, :through => :client_relationships, :conditions => "approved='1'", :source=>:user
end
It's working in the sense that I can say @current_user.clients and get all of the clients. However, I'd like to set up a URL /clients where I can list all of the current users clients. Does anyone know how I can do this?
I've tried setting up a :clients resource in my routes and a clients controller, but since there's no Clients model it throws and error.