module ActiveFedora::FilePersistence
Private Instance Methods
_create_record(_options = {})
click to toggle source
# File lib/active_fedora/file_persistence.rb, line 9 def _create_record(_options = {}) return false if content.nil? @ldp_source = build_ldp_binary_source ldp_source.create do |req| req.headers.merge!(ldp_headers) end refresh end
_update_record(_options = {})
click to toggle source
# File lib/active_fedora/file_persistence.rb, line 18 def _update_record(_options = {}) return true unless content_changed? ldp_source.content = content ldp_source.update do |req| req.headers.merge!(ldp_headers) end refresh end
build_ldp_binary_source()
click to toggle source
# File lib/active_fedora/file_persistence.rb, line 27 def build_ldp_binary_source if id build_ldp_resource_via_uri(uri, content) else build_ldp_resource_via_uri(nil, content) end end