Displaying 1 result from an estimated 1 matches for "media_container".
2009 Jun 21
1
cannot do mass_assignment when inherited class ?
...hree",
"short_description"=>"something new", "description"=>"<p>fsdfgdsg</
p>"}
Elibrary is declared as inherited from MediaItem, and attr are
declared accessible in MediaItem....
class MediaItem < ActiveRecord::Base
belongs_to :media_container
# Behaviours
acts_as_nested_set
attr_accessible :title, :short_description, :description
...
class Elibrary < MediaItem
end
when @elibrary = Elibrary.new, then assigning attributes to @elibrary,
save is OK.....
1- even duplicatiing the attr_accessible in both classes doesn''t h...