Open flyingzumwalt opened 9 years ago
Added a branch that tests and fixes this, but I'm not confident that this is how you want to fix it (example: Could set attr_accessible inside of Worthwhile::GenericFileBase instead of in Worthwhile::GenericFile, or could refuse to use attr_accessible???), so not submitting a PR yet.
@flyingzumwalt My thoughts are to get rid of attr_accessible.
@flyingzumwalt If you don't want to go that far, look at what Sufia does here https://github.com/projecthydra/sufia/blob/1c8879de85f5b11c3f48e88f10e1d8d96123d010/sufia-models/app/models/concerns/sufia/generic_file.rb#L30
copy that to Worthwhile::GenericFileBase
This is because CurationConcern::GenericFileActor uses
sanitize_attributes
, which relies onaccessible_attributes
, which is set viaattr_accessible
.From https://github.com/curationexperts/worthwhile/blob/master/worthwhile-models/app/actors/curation_concern/generic_file_actor.rb#L19. BTW - the comment on this method mentions a release of Sufia 7.1???
attr_accessible behavior is deprecated in Rails. Looks like it's been re-implemented (partially) in Sufia? Not quite sure what's up with that. (see https://github.com/projecthydra/sufia/blob/master/sufia-models/app/models/concerns/sufia/generic_file/accessible_attributes.rb)
@jcoyne There are enough layers of strangeness here that I think this ticket needs attention.