class Alchemy::Custom::Model::ElFinder::Paths::ComponentFiles
Public Instance Methods
build_file_path(p)
click to toggle source
Costruisce il singolo file, passandogli l'active record di alchemy (Picture o Attachment)
@param [Alchemy::Picture | Alchemy::Attachment] p
# File lib/alchemy/custom/model/el_finder/paths/component_files.rb, line 20 def build_file_path(p) base_class = ComponentFile file_path = base_class.new(@root, "#{self.path}/#{base_class.file_to_uri(p)}", volume: self.volume) file_path.active_record_instance = p file_path end
children(with_directory = true)
click to toggle source
# File lib/alchemy/custom/model/el_finder/paths/component_files.rb, line 6 def children(with_directory = true) @volume.record.send(@volume.attribute).collect do |p| build_file_path(p) end end