This repository has been archived by the owner on Jul 31, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 5
GenericFile Title does not update when you set it in Create or Update forms #34
Labels
Comments
flyingzumwalt
added a commit
that referenced
this issue
Nov 11, 2014
…ield on GenericFile create/update form actually gets applied to the GenericFile object refs #34
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 |
flyingzumwalt
added a commit
that referenced
this issue
Nov 11, 2014
…ield on GenericFile create/update form actually gets applied to the GenericFile object refs #34
flyingzumwalt
added a commit
that referenced
this issue
Nov 11, 2014
…ield on GenericFile create/update form actually gets applied to the GenericFile object refs #34
flyingzumwalt
added a commit
that referenced
this issue
Nov 11, 2014
…ield on GenericFile create/update form actually gets applied to the GenericFile object refs #34
flyingzumwalt
added a commit
that referenced
this issue
Nov 11, 2014
…ield on GenericFile create/update form actually gets applied to the GenericFile object refs #34
flyingzumwalt
added a commit
that referenced
this issue
Nov 11, 2014
…ield on GenericFile create/update form actually gets applied to the GenericFile object refs #34
flyingzumwalt
added a commit
that referenced
this issue
Nov 11, 2014
…ield on GenericFile create/update form actually gets applied to the GenericFile object refs #34
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
The text was updated successfully, but these errors were encountered: