search for: castlesbt

Displaying 1 result from an estimated 1 matches for "castlesbt".

Did you mean: castles
2009 Apr 28
1
help active record modeling.
...I have difficulties to model active record. So please help my trouble. Let''s suppose there are nations which have castles at least 1, and there are 3 types of castles. So I will make these tables. NationsTable, CastlesTable have common attributes of 3 types of castle. CastlesATable, CastlesBTable, CastlesCTable each have its unique attributes. In this case how can I represent this DB to AR? I think class Nation < ActiveRecord::Base has_many :castles end class Castle < ActiveRecord::Base belongs_to :Nations end but I''m not sure of what will be coded to these models....