Models in my app
class Category < ActiveRecord::Base
has_many :dishes, :dependent => :destroy
end
class Dish < ActiveRecord::Base
attr_accessible :assets_attributes
belongs_to :category
has_many :assets
accepts_nested_attributes_for :assets, :allow_destroy => true
end
class Asset < ActiveRecord::Base
belongs_to :dish
has_attached_file :asset, :styles => { :large => "640x480", :medium => "300x300>", :thumb => "100x100>" }
end
class Category < ActiveRecor