I got the following error when trying to create the elibrary instance
(rdb:21) @elibrary = Elibrary.new(params[:elibrary])
RuntimeError Exception: Declare either attr_protected or
attr_accessible for Elibrary, but not both.
params : “elibrary”=>{“title”=>“bingo three”,
“short_description”=>“something new”, “description”=>“
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 help
2- acts_as_nested_set brought additional fields … ant issue with it ?