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.41.1 lib/scrivito/editing_context_helper.rb
scrivito_sdk-0.41.0 lib/scrivito/editing_context_helper.rb
scrivito_sdk-0.41.0.rc2 lib/scrivito/editing_context_helper.rb
scrivito_sdk-0.41.0.rc1 lib/scrivito/editing_context_helper.rb
scrivito_sdk-0.40.0 lib/scrivito/editing_context_helper.rb
scrivito_sdk-0.40.0.rc2 lib/scrivito/editing_context_helper.rb
scrivito_sdk-0.40.0.rc1 lib/scrivito/editing_context_helper.rb
scrivito_sdk-0.30.0 lib/scrivito/editing_context_helper.rb
scrivito_sdk-0.30.0.rc1 lib/scrivito/editing_context_helper.rb