Sha256: 3d930de88d701c5ae474f7d4d69c3616dfb5c5ce31ce7c7baed979eaabf8aec4

Contents?: true

Size: 691 Bytes

Versions: 27

Compression:

Stored size: 691 Bytes

Contents

module Alchemy::Custom::Model::ElFinder
  module Paths
    class ComponentFiles < Base


      def children(with_directory = true)

        @volume.record.send(@volume.attribute).collect do |p|

          build_file_path(p)

        end

      end

      ##
      # Costruisce il singolo file, passandogli l'active record di alchemy (Picture o Attachment)
      #
      # @param [Alchemy::Picture | Alchemy::Attachment] p
      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

    end
  end
end

Version data entries

27 entries across 27 versions & 1 rubygems

Version Path
alchemy-custom-model-3.2 lib/alchemy/custom/model/el_finder/paths/component_files.rb
alchemy-custom-model-3.1.5 lib/alchemy/custom/model/el_finder/paths/component_files.rb
alchemy-custom-model-3.1.4 lib/alchemy/custom/model/el_finder/paths/component_files.rb
alchemy-custom-model-3.1.3 lib/alchemy/custom/model/el_finder/paths/component_files.rb
alchemy-custom-model-3.1.2 lib/alchemy/custom/model/el_finder/paths/component_files.rb
alchemy-custom-model-3.1.1 lib/alchemy/custom/model/el_finder/paths/component_files.rb
alchemy-custom-model-3.1.0 lib/alchemy/custom/model/el_finder/paths/component_files.rb
alchemy-custom-model-2.2.2 lib/alchemy/custom/model/el_finder/paths/component_files.rb
alchemy-custom-model-3.0.0 lib/alchemy/custom/model/el_finder/paths/component_files.rb
alchemy-custom-model-2.2.1 lib/alchemy/custom/model/el_finder/paths/component_files.rb
alchemy-custom-model-2.2.0 lib/alchemy/custom/model/el_finder/paths/component_files.rb
alchemy-custom-model-2.1.2 lib/alchemy/custom/model/el_finder/paths/component_files.rb
alchemy-custom-model-2.1.1 lib/alchemy/custom/model/el_finder/paths/component_files.rb
alchemy-custom-model-2.1.0 lib/alchemy/custom/model/el_finder/paths/component_files.rb
alchemy-custom-model-2.0.3 lib/alchemy/custom/model/el_finder/paths/component_files.rb
alchemy-custom-model-2.0.2 lib/alchemy/custom/model/el_finder/paths/component_files.rb
alchemy-custom-model-2.0.1 lib/alchemy/custom/model/el_finder/paths/component_files.rb
alchemy-custom-model-2.0.0 lib/alchemy/custom/model/el_finder/paths/component_files.rb
alchemy-custom-model-0.1.9 lib/alchemy/custom/model/el_finder/paths/component_files.rb
alchemy-custom-model-0.1.7 lib/alchemy/custom/model/el_finder/paths/component_files.rb