Sha256: e8675d5abce2c8d4b4c24824f55f3e8564186624b93a08659c933eb069457005

Contents?: true

Size: 695 Bytes

Versions: 10

Compression:

Stored size: 695 Bytes

Contents

module Alchemy
  module Admin
    module PicturesHelper
      def create_or_assign_url(picture_to_assign, options)
        if @content.nil?
          {
            controller: :contents,
            action: :create,
            picture_id: picture_to_assign.id,
            content: {
              essence_type: "Alchemy::EssencePicture",
              element_id: @element.id
            },
            options: options
          }
        else
          {
            controller: :essence_pictures,
            action: :assign,
            picture_id: picture_to_assign.id,
            content_id: @content.id,
            options: options
          }
        end
      end
    end
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
alchemy_cms-3.4.2 app/helpers/alchemy/admin/pictures_helper.rb
alchemy_cms-3.4.1 app/helpers/alchemy/admin/pictures_helper.rb
alchemy_cms-3.3.3 app/helpers/alchemy/admin/pictures_helper.rb
alchemy_cms-3.3.2 app/helpers/alchemy/admin/pictures_helper.rb
alchemy_cms-3.4.0 app/helpers/alchemy/admin/pictures_helper.rb
alchemy_cms-3.4.0.rc1 app/helpers/alchemy/admin/pictures_helper.rb
alchemy_cms-3.3.1 app/helpers/alchemy/admin/pictures_helper.rb
alchemy_cms-3.3.0 app/helpers/alchemy/admin/pictures_helper.rb
alchemy_cms-3.3.0.rc2 app/helpers/alchemy/admin/pictures_helper.rb
alchemy_cms-3.3.0.rc1 app/helpers/alchemy/admin/pictures_helper.rb