Sha256: b3dda9021eb0915741e1892e716ebb5de7156e4a68f02e81251d54721fa6e125

Contents?: true

Size: 748 Bytes

Versions: 6

Compression:

Stored size: 748 Bytes

Contents

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

      helper "Alchemy::Admin::Contents"

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

      def update
        @essence_file = EssenceFile.find(params[:id])
        @essence_file.update(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

6 entries across 6 versions & 1 rubygems

Version Path
alchemy_cms-3.1.0.rc1 app/controllers/alchemy/admin/essence_files_controller.rb
alchemy_cms-3.1.0.beta6 app/controllers/alchemy/admin/essence_files_controller.rb
alchemy_cms-3.1.0.beta5 app/controllers/alchemy/admin/essence_files_controller.rb
alchemy_cms-3.1.0.beta4 app/controllers/alchemy/admin/essence_files_controller.rb
alchemy_cms-3.1.0.beta3 app/controllers/alchemy/admin/essence_files_controller.rb
alchemy_cms-3.1.0.beta2 app/controllers/alchemy/admin/essence_files_controller.rb