Class: Alchemy::Custom::Model::ElFinder::Paths::File

Inherits:
ActiveRecordReference show all
Defined in:
lib/alchemy/custom/model/el_finder/paths/file.rb

Direct Known Subclasses

Image

Constant Summary

Constants inherited from ActiveRecordReference

ActiveRecordReference::URI_SPACER

Instance Attribute Summary

Attributes inherited from Base

#path, #root, #volume

Instance Method Summary collapse

Methods inherited from ActiveRecordReference

#active_record_instance, #active_record_instance=, #directory?, #file, #file?, file_to_uri, #fisical_path

Methods inherited from Base

#absolute?, #basename, #basename_sans_extension, #child_directories, #children, #cleanpath, #directory?, #dirname, #duplicate, #extname, #file?, #fisical_path, #fullpath, #initialize, #is_image?, #is_root?, #mime_type, #mtime, #name, #outside_of_root?, #realpath, #relative?, #relative_to, #rename, #tmb, #to_s, #unique, #with_sub_dirs?

Constructor Details

This class inherits a constructor from Alchemy::Custom::Model::ElFinder::Paths::Base

Instance Method Details

#active_record_classObject



11
12
13
# File 'lib/alchemy/custom/model/el_finder/paths/file.rb', line 11

def active_record_class
  ::Alchemy::Attachment
end

#full_fill_paylod(payload) ⇒ Object



5
6
7
8
# File 'lib/alchemy/custom/model/el_finder/paths/file.rb', line 5

def full_fill_paylod(payload)
  payload[:original_url] = ::Alchemy::Engine.routes.url_helpers.download_attachment_path(id: active_record_instance.id, name: active_record_instance.urlname)
  payload
end

#global_idObject



16
17
18
# File 'lib/alchemy/custom/model/el_finder/paths/file.rb', line 16

def global_id
  active_record_instance.to_signed_global_id.to_s
end