Skip to content

Commit

Permalink
Release version 0.7.2: Make session attributes available in the views
Browse files Browse the repository at this point in the history
  • Loading branch information
UweKubosch committed Oct 19, 2023
1 parent a13f0e1 commit 3c059d0
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ plugins {
}

group 'no.datek'
version '0.7.1'
version '0.7.2'
final String JRUBY_VERSION = '9.4.3.0';

repositories {
Expand Down
1 change: 1 addition & 0 deletions src/main/resources/ruby/slim_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ def params.[](key)
context_values = RequestContext.default_context(locale, params, rendering_context, request)
context_values.update variables
context_values.update Hash[request.getAttributeNames.select { |a| a !~ /\./ && !context_values[a] }.map { |a| [a, request.getAttribute(a)] }]
context_values.update Hash[request.session.getAttributeNames.select { |a| a !~ /\./ && !context_values[a] }.map { |a| [a, request.session.getAttribute(a)] }]
context_values.update RequestContext.application_attributes(request)
view_shape = VIEW_SHAPES.fetch_or_store(context_values.keys) do |key|
LOG.info "Creating new view shape (#{rendering_context.url}): #{context_values.keys}"
Expand Down

0 comments on commit 3c059d0

Please sign in to comment.