class Alchemy::Custom::Model::ElFinder::Paths::ComponentFile
Public Instance Methods
active_record_class()
click to toggle source
# File lib/alchemy/custom/model/el_finder/paths/component_file.rb, line 5 def active_record_class self.volume.attribute_class end
alchemy_record()
click to toggle source
# File lib/alchemy/custom/model/el_finder/paths/component_file.rb, line 9 def alchemy_record return @_alch_record_cache if @_alch_record_cache base = active_record_instance self.volume.file_link_ref.split('.').each {|m| base = base.try(m)} @_alch_record_cache = base end
file()
click to toggle source
# File lib/alchemy/custom/model/el_finder/paths/component_file.rb, line 16 def file case alchemy_record when ::Alchemy::Attachment alchemy_record.file when ::Alchemy::Picture alchemy_record.image_file end end
file=(val)
click to toggle source
# File lib/alchemy/custom/model/el_finder/paths/component_file.rb, line 26 def file=(val) case alchemy_record when ::Alchemy::Attachment alchemy_record.file = val when ::Alchemy::Picture alchemy_record.image_file = val end end
full_fill_paylod(payload)
click to toggle source
# File lib/alchemy/custom/model/el_finder/paths/component_file.rb, line 37 def full_fill_paylod(payload) payload[:tmb] = self.tmb payload end
is_image?()
click to toggle source
# File lib/alchemy/custom/model/el_finder/paths/component_file.rb, line 53 def is_image? alchemy_record.is_a? ::Alchemy::Picture end
tmb()
click to toggle source
# File lib/alchemy/custom/model/el_finder/paths/component_file.rb, line 43 def tmb case alchemy_record when ::Alchemy::Attachment '' when ::Alchemy::Picture file.thumb('100x100#').url end end