The error is somewhere in your class declaration, but the message you're getting doesn't appear until you run attributes=. I'd look at the other plugins you're using, as somebody's calling attr_protected on MediaItem.
--Mat Jones On Jun 21, 9:46 am, Erwin <[email protected]> wrote: > 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"=>"<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 help > 2- acts_as_nested_set brought additional fields .. ant issue with it ? --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---

