Sha256: c026001faa1aec7f466ebd4c41593e30a53a8f96f85f0f690614649077e05169

Contents?: true

Size: 717 Bytes

Versions: 3

Compression:

Stored size: 717 Bytes

Contents

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

      helper "Alchemy::Admin::Contents"

      def edit
        @content = Content.find(params[:id])
        @essence_file = @content.essence
        render :layout => false
      end

      def update
        @essence_file = EssenceFile.find(params[:id])
        @essence_file.update_attributes(params[:essence_file], :as => current_user.role.to_sym)
      end

      def assign
        @content = Content.find_by_id(params[:id])
        @attachment = Attachment.find_by_id(params[:attachment_id])
        @content.essence.attachment = @attachment
        @options = params[:options] || {}
      end

    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
alchemy_cms-2.2.rc3 app/controllers/alchemy/admin/essence_files_controller.rb
alchemy_cms-2.2.rc2 app/controllers/alchemy/admin/essence_files_controller.rb
alchemy_cms-2.2.rc1 app/controllers/alchemy/admin/essence_files_controller.rb