Class: Worthwhile::LinkedResource
- Inherits:
-
ActiveFedora::Base
- Object
- ActiveFedora::Base
- Worthwhile::LinkedResource
- Includes:
- ActionView::Helpers::SanitizeHelper, CurationConcern::Work
- Defined in:
- app/models/worthwhile/linked_resource.rb
Instance Method Summary collapse
Methods included from CurationConcern::WithLinkedResources
#after_destroy_cleanup_linked_resources
Methods included from CurationConcern::WithEditors
#add_editor, #add_editor_group, #add_editor_groups, #add_editors, #remove_editor, #remove_editor_group, #remove_editor_groups, #remove_editors
Methods included from CurationConcern::WithGenericFiles
#before_destroy_cleanup_generic_files, #copy_visibility_to_files
Methods included from CurationConcern::Curatable
#as_json, #as_rdf_object, #can_be_member_of_collection?, #to_partial_path
Instance Method Details
#to_s ⇒ Object
30 31 32 |
# File 'app/models/worthwhile/linked_resource.rb', line 30 def to_s url end |
#to_solr(solr_doc = {}, opts = {}) ⇒ Object
34 35 36 37 38 |
# File 'app/models/worthwhile/linked_resource.rb', line 34 def to_solr(solr_doc={}, opts={}) super Solrizer.set_field(solr_doc, 'url', url, :stored_searchable) solr_doc end |
#url ⇒ Object
26 27 28 |
# File 'app/models/worthwhile/linked_resource.rb', line 26 def url content.dsLocation end |
#url=(url) ⇒ Object
20 21 22 23 24 |
# File 'app/models/worthwhile/linked_resource.rb', line 20 def url=(url) u = URI::Parser.new.parse(url) return unless [URI::HTTP, URI::HTTPS, URI::FTP].include?(u.class) content.dsLocation = u.to_s end |