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 rubyonrails-talk@googlegroups.com To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---