Hello,
I exposed information about if a user is logged in in the base action.rb. I can access those exposes in the template, but not the layout. Is there. a trick I am missing to access the exposed variables in the layout?
# app/view.rb
expose :authenticated
expose :current_user
In the individual page the values render
#app/templates/health/status.html.erb
<% if authenticated %>
<%= current_user.display_name %>
<% else %>
<%= link_to "Login", routes.path(:user_login) %>
<% end %>
In the layout I get an error about an unknown variable authenticated
#app/templates/layouts/app.html.erb
<% if authenticated %>
<%= current_user.display_name %>
<% else %>
<%= link_to "Login", routes.path(:user_login) %>
<% end %>