Displaying 1 result from an estimated 1 matches for "categoryitem".
Did you mean:
category_items
2009 Apr 12
0
rails 2.3 nested forms with has_many through checkboxes
...age_categories, :allow_destroy =>
true, :reject_if => proc { |attrs| attrs.all? { |k, v| v.blank? } }
end
class PageCategory < ActiveRecord::Base
has_many :pages, :through => :category_items, :source
=> :item, :source_type => ''Page'', :uniq => true
end
class CategoryItem < ActiveRecord::Base
belongs_to :category, :polymorphic => true
belongs_to :item, :polymorphic => true
end
Page Category partial for my page form (hooks into a jquery script to
dynamically add/remove page category form fields)...
<a href="#" id="page_categories"...