RailsCasts Pro episodes are now free!

Learn more or hide this

Aniruddha SG's Profile

GitHub User: aniruddha

Comments by Aniruddha SG

Avatar

Hi everyone wonderful episode,
 but a small problem i'm facing that is
i have a has_many association set up between category and sub category,
Class Category ..
 attr_accessible :name, :subcategories_atttributes
 has_many subcategories, dependent => :destroy
accepts_nested_attributes_for :subcategories

end

Class Subcategory..
belongs_to :category

end
 
error which i get while saving a category along with its subcategories is
    * Subcategories category can't be blank

thanks in advance