Class: Asset

Inherits:
Kithe::Asset
  • Object
show all
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

Instance Method Details

#full_file_urlObject



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_parentObject



45
46
47
# File 'app/models/asset.rb', line 45

def reindex_parent
  parent.save if parent.present?
end

#remove_parent_dct_references_uriObject



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_uriObject



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