Sha256: 886f1a47e93cfa69b1ad2dfe81edca56a0c495607eac4639f8c6b93a683fc5fd

Contents?: true

Size: 563 Bytes

Versions: 16

Compression:

Stored size: 563 Bytes

Contents

module Alchemy
  class ElementsController < Alchemy::BaseController

    filter_access_to :show, :attribute_check => true, :model => Alchemy::Element, :load_method => :load_element
    layout false

    # Returns the element partial as HTML or as JavaScript that tries to replace a given +container_id+ with the partial content via jQuery.
    def show
      @page = @element.page
      respond_to do |format|
        format.html
        format.js
      end
    end

    private

    def load_element
      @element = Element.find(params[:id])
    end

  end
end

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
alchemy_cms-2.2.4 app/controllers/alchemy/elements_controller.rb
alchemy_cms-2.2.3.2 app/controllers/alchemy/elements_controller.rb
alchemy_cms-2.2.3.1 app/controllers/alchemy/elements_controller.rb
alchemy_cms-2.2.2 app/controllers/alchemy/elements_controller.rb
alchemy_cms-2.2.1 app/controllers/alchemy/elements_controller.rb
alchemy_cms-2.2.0 app/controllers/alchemy/elements_controller.rb
alchemy_cms-2.2.rc15 app/controllers/alchemy/elements_controller.rb
alchemy_cms-2.2.rc14 app/controllers/alchemy/elements_controller.rb
alchemy_cms-2.2.rc13 app/controllers/alchemy/elements_controller.rb
alchemy_cms-2.2.rc11 app/controllers/alchemy/elements_controller.rb
alchemy_cms-2.2.rc8 app/controllers/alchemy/elements_controller.rb
alchemy_cms-2.2.rc7 app/controllers/alchemy/elements_controller.rb
alchemy_cms-2.2.rc6 app/controllers/alchemy/elements_controller.rb
alchemy_cms-2.2.rc3 app/controllers/alchemy/elements_controller.rb
alchemy_cms-2.2.rc2 app/controllers/alchemy/elements_controller.rb
alchemy_cms-2.2.rc1 app/controllers/alchemy/elements_controller.rb