Sha256: f8037746cfd62581d2b12bf75f0fb5307a1ac3a23d07b4b7e9cef34c295c1304

Contents?: true

Size: 674 Bytes

Versions: 39

Compression:

Stored size: 674 Bytes

Contents

# frozen_string_literal: true

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

      before_action :load_essence_file, only: [:edit, :update]

      helper "Alchemy::Admin::Contents"

      def edit
        @content = @essence_file.content
      end

      def update
        @essence_file.update(essence_file_params)
      end

      private

      def essence_file_params
        params.require(:essence_file).permit(:title, :css_class, :link_text)
      end

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

Version data entries

39 entries across 39 versions & 1 rubygems

Version Path
alchemy_cms-6.1.10 app/controllers/alchemy/admin/essence_files_controller.rb
alchemy_cms-6.1.9 app/controllers/alchemy/admin/essence_files_controller.rb
alchemy_cms-6.1.8 app/controllers/alchemy/admin/essence_files_controller.rb
alchemy_cms-6.1.7 app/controllers/alchemy/admin/essence_files_controller.rb
alchemy_cms-6.1.6 app/controllers/alchemy/admin/essence_files_controller.rb
alchemy_cms-6.1.5 app/controllers/alchemy/admin/essence_files_controller.rb
alchemy_cms-6.0.14 app/controllers/alchemy/admin/essence_files_controller.rb
alchemy_cms-6.1.4 app/controllers/alchemy/admin/essence_files_controller.rb
alchemy_cms-6.0.13 app/controllers/alchemy/admin/essence_files_controller.rb
alchemy_cms-6.1.3 app/controllers/alchemy/admin/essence_files_controller.rb
alchemy_cms-6.1.2 app/controllers/alchemy/admin/essence_files_controller.rb
alchemy_cms-6.1.1 app/controllers/alchemy/admin/essence_files_controller.rb
alchemy_cms-6.1.0 app/controllers/alchemy/admin/essence_files_controller.rb
alchemy_cms-6.0.12 app/controllers/alchemy/admin/essence_files_controller.rb
alchemy_cms-6.0.11 app/controllers/alchemy/admin/essence_files_controller.rb
alchemy_cms-6.0.10 app/controllers/alchemy/admin/essence_files_controller.rb
alchemy_cms-6.0.9 app/controllers/alchemy/admin/essence_files_controller.rb
alchemy_cms-6.0.8 app/controllers/alchemy/admin/essence_files_controller.rb
alchemy_cms-6.0.7 app/controllers/alchemy/admin/essence_files_controller.rb
alchemy_cms-6.0.6 app/controllers/alchemy/admin/essence_files_controller.rb