Class: Asset
- Inherits:
-
Kithe::Asset
- Object
- Kithe::Asset
- Asset
- Includes:
- AttrJson::Record::QueryScopes
- Defined in:
- app/models/asset.rb
Constant Summary collapse
- DERIVATIVE_STORAGE_TYPE_LOCATIONS =
{ "public" => :kithe_derivatives }.freeze
Instance Method Summary collapse
- #full_file_url ⇒ Object
- #reindex_parent ⇒ Object
- #remove_parent_dct_references_uri ⇒ Object
- #set_parent_dct_references_uri ⇒ Object
Instance Method Details
#full_file_url ⇒ Object
20 21 22 23 24 25 26 |
# File 'app/models/asset.rb', line 20 def full_file_url if Rails.env.development? "http://localhost:3000" + file.url else file.url end end |
#reindex_parent ⇒ Object
45 46 47 |
# File 'app/models/asset.rb', line 45 def reindex_parent parent.save if parent.present? end |
#remove_parent_dct_references_uri ⇒ Object
38 39 40 |
# File 'app/models/asset.rb', line 38 def remove_parent_dct_references_uri GeoblacklightAdmin::RemoveParentDctReferencesUriJob.perform_later(self) if parent_id.present? end |
#set_parent_dct_references_uri ⇒ Object
31 32 33 |
# File 'app/models/asset.rb', line 31 def set_parent_dct_references_uri GeoblacklightAdmin::SetParentDctReferencesUriJob.perform_later(self) if parent_id.present? end |