Fix "undefined method `is_builder?' for nil:NilClass" in static/error.html.erb.
`CurrentUser.user` may be nil if an exception is raised before it's initialized.
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
<% if CurrentUser.user.is_builder? && @exception.present? %>
|
||||
<% if CurrentUser.user.try(:is_builder?) && @exception.present? %>
|
||||
<h1><%= @exception.class.to_s %> exception raised</h1>
|
||||
<ul style="font-family: monospace; font-size: 1.2em; list-style-type: none;">
|
||||
<li><%= @exception.message.dup.force_encoding("utf-8") %></li>
|
||||
|
||||
Reference in New Issue
Block a user