Sha256: ad858aa2e352cf0f3945d36febf17d3dfe8cc8548bbab6d15530be4bf61ae853

Contents?: true

Size: 325 Bytes

Versions: 6

Compression:

Stored size: 325 Bytes

Contents

module Amalgam
	module Editable

    def self.included(base)
      base.layout :layout_with_mercury
    end

    protected

    def content_layout
      nil
    end

    private

    def layout_with_mercury
      !params[:mercury_frame] && can_edit? && !request.xhr? ? 'amalgam/admin/editor' : content_layout
    end
	end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
amalgam-2.1.4.1 lib/amalgam/editable.rb
amalgam-2.1.4 lib/amalgam/editable.rb
amalgam-2.1.3.1 lib/amalgam/editable.rb
amalgam-2.1.3 lib/amalgam/editable.rb
amalgam-2.1.2 lib/amalgam/editable.rb
amalgam-2.1.1 lib/amalgam/editable.rb