Hey Walter, thanks for your reply. Yes I've read this part, but i've 
thought that it was not the best solution, probably i was worng.
Today I've saw also this solution, that maybe fit my problem
http://www.unixgods.org/~tilo/Rails/Rails_polymprphic_has_many_through_relationships.html

Please correct me if I'm wrong. You suggest me to do something like 
this?

class Location < ActiveRecord::Base
  has_many :details
  has_many :bars, :through => :details
  has_many :discos, :through => :details
end

class Detail < ActiveRecord::Base
  belongs_to :Location
  belongs_to :Bar
  belongs_to :Disco
end

class Bar < ActiveRecord::Base
  has_many :details
  has_many :Location, :through => :details
end

class Disco < ActiveRecord::Base
  has_many :details
  has_many :Location, :through => :details
end

thanks,

-- 
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 [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to