Here what I have
tv_show.rb
class TvShow < ActiveRecord::Base

  has_many :tv_show_managers
  has_many :customers, :through => :tv_show_managers

  attr_accessible :description
end

tv_show_manager.rb
class TvShowManager < ActiveRecord::Base

  belongs_to :customer
  belongs_to :tv_show
 attr_accessible :activated_field, :customer_id, :friendship_group_id,
:modify_on, :tv_show_id, :visible
end

customer.rb
class Customer < ActiveRecord::Base

  has_one :date_of_birth
  has_one :customized
  has_one :customer_state
  has_many :tv_show_managers
  has_many :tv_shows, :through => :tv_show_managers
 attr_accessible :approval_pending, :consent, :first, :is_activated,
:last, :last_visited, :normal_avatar, :organization_level_id, :password,
:registered_on, :security_answer, :security_level, :security_question,
:timezone, :username, :version
end

Essentially A customer may have many managers. A Manager is assign to
one tv_show

What his wrong with my code?

-- 
Posted via http://www.ruby-forum.com/.

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en-US.

Reply via email to