Sha256: c4e8925f2141ce57a623feefad0b59e66455282216a44312ee4069d2d51a5dcc

Contents?: true

Size: 637 Bytes

Versions: 6

Compression:

Stored size: 637 Bytes

Contents

module Alchemy
  class ElementsController < Alchemy::BaseController
    load_and_authorize_resource
    layout false

    rescue_from CanCan::AccessDenied do |exception|
      raise ActiveRecord::RecordNotFound
    end

    # == Renders the element view partial
    #
    # === Accepted Formats
    #
    # * html
    # * js (Tries to replace a given +container_id+ with the elements view partial content via jQuery.)
    #
    def show
      @page = @element.page
      @options = params[:options]

      respond_to do |format|
        format.html
        format.js { @container_id = params[:container_id] }
      end
    end
  end
end

Version data entries

6 entries across 6 versions & 2 rubygems

Version Path
alchemy_cms-3.2.1 app/controllers/alchemy/elements_controller.rb
lc_alchemy_cms-3.2.1 app/controllers/alchemy/elements_controller.rb
lc_alchemy_cms-3.2.0 app/controllers/alchemy/elements_controller.rb
alchemy_cms-3.2.0 app/controllers/alchemy/elements_controller.rb
alchemy_cms-3.2.0.rc1 app/controllers/alchemy/elements_controller.rb
alchemy_cms-3.2.0.beta app/controllers/alchemy/elements_controller.rb