Displaying 2 results from an estimated 2 matches for "clients_projects".
2006 Feb 11
6
Rails Edge, has_many :through in searches
I have two tables, a Projects table and a Clients table.
It''s basically a HABTM relationship, but I have additional project/
client-specific information in the join table. I''m trying to use the
new has_many :through method to join these. It works fine when
displaying records, but when I try to search, I''m having this problem:
When I used a HABTM model to search
2006 Apr 30
1
has_many :through, form for join model attributes
I have the following schema:
class ClientsProject < ActiveRecord::Base
belongs_to :client
belongs_to :project
end
class Client < ActiveRecord::Base
has_many :clients_projects
has_many :projects, :through => :clients_projects
end
class Project < ActiveRecord::Base
has_many :clients_projects
has_many :clients, :through => :clients_projects
end
I have a form to show the Project model. This form lists each
client''s name and contact informatio...