Sha256: d45f438cf6ff85c1d20181fe12d3caf13f33cb6e60ceab2f7d0ff5479a576faa

Contents?: true

Size: 304 Bytes

Versions: 29

Compression:

Stored size: 304 Bytes

Contents

module Scrivito

class EditingContextHelper < Struct.new(:request)
  def scrivito_user
    editing_context.editor
  end

  def in_editable_view?
    editing_context.editable_display_mode?
  end

  private

  def editing_context
    Scrivito::EditingContextMiddleware.from_request(request)
  end
end

end

Version data entries

29 entries across 29 versions & 1 rubygems

Version Path
scrivito_sdk-0.66.0 lib/scrivito/editing_context_helper.rb
scrivito_sdk-0.66.0.rc2 lib/scrivito/editing_context_helper.rb
scrivito_sdk-0.65.2 lib/scrivito/editing_context_helper.rb
scrivito_sdk-0.66.0.rc1 lib/scrivito/editing_context_helper.rb
scrivito_sdk-0.65.1 lib/scrivito/editing_context_helper.rb
scrivito_sdk-0.65.0 lib/scrivito/editing_context_helper.rb
scrivito_sdk-0.65.0.rc2 lib/scrivito/editing_context_helper.rb
scrivito_sdk-0.65.0.rc1 lib/scrivito/editing_context_helper.rb
scrivito_sdk-0.60.0 lib/scrivito/editing_context_helper.rb
scrivito_sdk-0.60.0.rc2 lib/scrivito/editing_context_helper.rb
scrivito_sdk-0.50.1 lib/scrivito/editing_context_helper.rb
scrivito_sdk-0.60.0.rc1 lib/scrivito/editing_context_helper.rb
scrivito_sdk-0.50.0 lib/scrivito/editing_context_helper.rb
scrivito_sdk-0.50.0.rc2 lib/scrivito/editing_context_helper.rb
scrivito_sdk-0.50.0.rc1 lib/scrivito/editing_context_helper.rb
scrivito_sdk-0.42.1 lib/scrivito/editing_context_helper.rb
scrivito_sdk-0.42.1.rc3 lib/scrivito/editing_context_helper.rb
scrivito_sdk-0.42.1.rc2 lib/scrivito/editing_context_helper.rb
scrivito_sdk-0.42.1.rc1 lib/scrivito/editing_context_helper.rb
scrivito_sdk-0.42.0 lib/scrivito/editing_context_helper.rb