Skip to content

Instantly share code, notes, and snippets.

@phuongdh phuongdh/console.rb
Last active Dec 14, 2015

Embed
What would you like to do?
Screwy SimpleDatastream
[56] pry(main)> mo = MediaObject.find("hydrant:175")
=> #<MediaObject:3344532618636883548 @pid="hydrant:175" >
[57] pry(main)> mo.section_pid
=> ["hydrant:176"]
[58] pry(main)> mo.section_pid = []
=> []
[59] pry(main)> mo.section_pid
=> ["hydrant:176"]
[60] pry(main)> mo.section_pid = []
=> []
[61] pry(main)> mo.save
=> true
[62] pry(main)> mo.section_pid
=> ["hydrant:176"]
[63] pry(main)> mo.section_pid = [""]
=> [""]
[64] pry(main)> mo.section_pid
=> []
has_metadata name:'sectionsMetadata', :type => ActiveFedora::SimpleDatastream do |sds|
sds.field :section_pid, :string
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.