Sha256: 6099e1a4f105f6ecc85deb96e478d16ae17397119ee3c446c678087f38abdc0c

Contents?: true

Size: 751 Bytes

Versions: 10

Compression:

Stored size: 751 Bytes

Contents

module Alchemy
  module Admin
    class EssenceFilesController < Alchemy::Admin::BaseController
      authorize_resource class: Alchemy::EssenceFile

      helper "Alchemy::Admin::Contents"

      def edit
        @content = Content.find(params[:id])
        @options = options_from_params
        @essence_file = @content.essence
      end

      def update
        @essence_file = EssenceFile.find(params[:id])
        @essence_file.update_attributes(params[:essence_file])
      end

      def assign
        @content = Content.find_by(id: params[:content_id])
        @attachment = Attachment.find_by(id: params[:attachment_id])
        @content.essence.attachment = @attachment
        @options = options_from_params
      end

    end
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
alchemy_cms-3.0.4 app/controllers/alchemy/admin/essence_files_controller.rb
alchemy_cms-3.0.3 app/controllers/alchemy/admin/essence_files_controller.rb
alchemy_cms-3.1.0.beta1 app/controllers/alchemy/admin/essence_files_controller.rb
alchemy_cms-3.0.2 app/controllers/alchemy/admin/essence_files_controller.rb
alchemy_cms-3.0.1 app/controllers/alchemy/admin/essence_files_controller.rb
alchemy_cms-3.0.0 app/controllers/alchemy/admin/essence_files_controller.rb
alchemy_cms-3.0.0.rc8 app/controllers/alchemy/admin/essence_files_controller.rb
alchemy_cms-3.0.0.rc7 app/controllers/alchemy/admin/essence_files_controller.rb
alchemy_cms-3.0.0.rc6 app/controllers/alchemy/admin/essence_files_controller.rb
alchemy_cms-3.0.0.rc5 app/controllers/alchemy/admin/essence_files_controller.rb