-
Notifications
You must be signed in to change notification settings - Fork 5
Makes terms_for_display accesible on Worthwhile::GenericFile #36
Conversation
@@ -11,7 +11,7 @@ module GenericFileBase | |||
include Sufia::GenericFile::Derivatives | |||
include Sufia::GenericFile::Metadata | |||
include Sufia::GenericFile::Versions | |||
include Sufia::Permissions::Readable | |||
include Sufia::GenericFile::Permissions |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think we want Sufia::GenericFile::Permissions because that introduces methods that overwrite Hydra::AccessControls::Permissions
c95ceef
to
946e4d4
Compare
@@ -5,6 +5,11 @@ | |||
subject.depositor = '[email protected]' | |||
end | |||
|
|||
it "should update attributes" do | |||
subject.attributes = {title:"My new Title"} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This causes a deprecation warning:
.DEPRECATION WARNING: You attempted to set the attribute `title' on `Worthwhile::GenericFile' to a scalar value. However, this attribute is declared as being multivalued. This behavior is deprecated and will raise an ArgumentError in active-fedora 8.0.0. (called from block in attributes= at /home/travis/.rvm/gems/ruby-2.1.4/gems/active-fedora-7.1.1/lib/active_fedora/attributes.rb:21)
Can you set it to an array instead?
@@ -132,10 +132,11 @@ | |||
end | |||
|
|||
context "updating metadata" do | |||
it "should be successful" do | |||
it "should be successful and update attributes" do | |||
post :update, id: generic_file, generic_file: | |||
{title: 'new_title', tag: [''], permissions: { new_user_name: {'archivist1'=>'edit'}}} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would you mind setting the title value to an array? I think it causes a deprecation warning, although I know you didn't cause it.
3aeb2a3
to
88dd5a0
Compare
…ield on GenericFile create/update form actually gets applied to the GenericFile object refs #34
88dd5a0
to
7fd39d1
Compare
@jcoyne it looks like this is ready to be merged. Does it need any other attention? |
Makes terms_for_display accesible on Worthwhile::GenericFile
This is so that the :title attribute (along with any other terms) on GenericFile create/update form actually gets applied to the GenericFile object
refs #34