Displaying 1 result from an estimated 1 matches for "thingcollect".
2006 May 18
3
Model Madness: habtm vs through
...lt; ActiveRecord::Base
belongs_to :person
has_and_belongs_to_many :collections, :order => ''position''
end
class Collection < ActiveRecord::Base
belongs_to :person
has_and_belongs_to_many :thing_collections, :order => ''position''
end
class ThingCollection < ActiveRecord::Base
has_and_belongs_to_many :collections
has_and_belongs_to_many :things
acts_as_list :scope => :collections
end
-*-*-*-*-*-*-*-*
Is that right?
or is it better to do something like this:
-*-*-*-*-*-
class Person < ActiveRecord::Base
has_many :things...