Unable to check if first_time_visiting?
inside an existing first_time_visiting?
.
def first_time_visiting?
return false if cookies[:first_visit]
cookies[:first_visit] = 0
end
helper_method :first_time_visiting?
<% if first_time_visiting? %>
<%= render 'This works' %>
<%= render 'shared/some_partial' %>
<% end %>
<% if first_time_visiting? %>
<%= render 'This doesn't work' %>
<% end %>
<%# Other unrelated ERB here %>