From 97dbfe55b2f2f7f0c414c2a018b1960984d51089 Mon Sep 17 00:00:00 2001 From: arcasys Date: Sun, 11 Mar 2018 19:04:50 +0100 Subject: [PATCH 1/2] Update show.html.erb '&&' is not appropriate as an operator here (if both operands are nil the result is "expression". Use '&' or 'and' instead. Please also check newer code for inappropriate '&&' usage, --- app/views/spree/static_content/show.html.erb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/views/spree/static_content/show.html.erb b/app/views/spree/static_content/show.html.erb index 480abbab..618389ef 100644 --- a/app/views/spree/static_content/show.html.erb +++ b/app/views/spree/static_content/show.html.erb @@ -12,7 +12,7 @@ <% end -%> <% content_for :sidebar do %> - <% if defined? @products && defined? @taxon %> + <% if defined? @products & defined? @taxon %> <%= render :partial => "spree/shared/filters" %> <% elsif defined? @taxonomies %> <%= render :partial => "spree/shared/taxonomies" %> @@ -23,4 +23,4 @@
<%= raw @page.body %>
-<% end %> \ No newline at end of file +<% end %> From f6f581bc0efbdf2a791b1eea3013a2a188ffd3d1 Mon Sep 17 00:00:00 2001 From: arcasys Date: Mon, 12 Mar 2018 21:15:42 +0100 Subject: [PATCH 2/2] Update show.html.erb This should work as expected (while '&' obviously won't, beeing a bitwise operator). --- app/views/spree/static_content/show.html.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/spree/static_content/show.html.erb b/app/views/spree/static_content/show.html.erb index 618389ef..56216f2c 100644 --- a/app/views/spree/static_content/show.html.erb +++ b/app/views/spree/static_content/show.html.erb @@ -12,7 +12,7 @@ <% end -%> <% content_for :sidebar do %> - <% if defined? @products & defined? @taxon %> + <% if defined?(@products) and defined?(@taxon) %> <%= render :partial => "spree/shared/filters" %> <% elsif defined? @taxonomies %> <%= render :partial => "spree/shared/taxonomies" %>