Displaying 2 results from an estimated 2 matches for "type_descript".
2006 Jun 13
3
acts_as_tree problem accessing parent object
...ications = Certification.find(:all, :order=>''date'')
    end
end
summary_list.rhtml
 <% for certification in @certifications %>
		<%= certification.certification_type.parent.id %>
 <% end %>
so, the line above (<%= 
certification.certification_type.parent.type_description %> ) does not 
work; it says The error occured while evaluating nil.type_description.
if i do a debug(certification.certification_type.parent) it shows that i 
have a hash of values:
--- !ruby/object:CertificationType
attributes:
  type_description: Allergy & Immunology
  id: "12&qu...
2006 Apr 22
6
STI and type tables?
So by default to get STI, I would have something like:
    create_table :items do |t|
      t.column "type", :string   
      t.column "title", :string  
    end
But if I want to store those type values in a separate table, such 
that I have ...
    create_table :items do |t|
      t.column "item_type_id", :string   
      t.column "title", :string