Sha256: 2807dfe0d9dec2c92fc82bcebc108ba99397d2fe622cca6de32f8286d4ebbcf2

Contents?: true

Size: 504 Bytes

Versions: 27

Compression:

Stored size: 504 Bytes

Contents

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

      def children(with_directory = true)
        ::Alchemy::Attachment.all.collect {|p|
          build_file_path(p)
        }
      end

      def build_file_path(p)
        base_class = Paths::File

        Rails.logger.debug {"#{@root}-#{self.path}"}
        image = base_class.new(@root, "#{self.path}/#{base_class.file_to_uri(p)}")

        image.active_record_instance = p

        image
      end

    end
  end
end

Version data entries

27 entries across 27 versions & 1 rubygems

Version Path
alchemy-custom-model-0.1.6 lib/alchemy/custom/model/el_finder/paths/files.rb
alchemy-custom-model-0.1.5 lib/alchemy/custom/model/el_finder/paths/files.rb
alchemy-custom-model-0.1.4 lib/alchemy/custom/model/el_finder/paths/files.rb
alchemy-custom-model-0.1.3 lib/alchemy/custom/model/el_finder/paths/files.rb
alchemy-custom-model-0.1.2 lib/alchemy/custom/model/el_finder/paths/files.rb
alchemy-custom-model-0.1.1 lib/alchemy/custom/model/el_finder/paths/files.rb
alchemy-custom-model-0.1.0 lib/alchemy/custom/model/el_finder/paths/files.rb