2009/6/6 Jay Covington <[email protected]>: >... > > class CreateListhubs < ActiveRecord::Migration > def self.up > create_table :listhubs do |t| > t.column :title, :string > t.column :item1, :string > t.column :item2, :string > t.column :item3, :string > t.column :item4, :string > t.column :item5, :string > t.column :item6, :string > t.column :item7, :string > t.column :item8, :string > t.column :item9, :string > t.column :item10, :string >
Have you considered having a separate table of list_items with a HABTM relationship between the listhub and the list_items? Alternatively if an Apple on one list should be a different object to one on another (in other words are the list_items objects in their own right or are they object types) then listhub has_many list_items and list_item belongs_to listub. These may appear to be more complex solutions but in the long run might prove easier. Your counting for example would be much easier. Colin --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---

