Sha256: 561f728198e8d3f1f75ff425406a02303b598f9e61967d77a812d63f345fe7cf

Contents?: true

Size: 501 Bytes

Versions: 25

Compression:

Stored size: 501 Bytes

Contents

module Alchemy::Custom::Model::ElFinder
  module Paths
    class File < ActiveRecordReference

      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


      def active_record_class
        ::Alchemy::Attachment
      end


      def global_id
        active_record_instance.to_signed_global_id.to_s
      end

    end
  end
end

Version data entries

25 entries across 25 versions & 1 rubygems

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