How to support optional variables in ERB templates
This will give the variable "something" a value of "nothing" if it's not defined:
<%
something = 'nothing' if local_assigns.has_key? :something
%>
This will give the variable "something" a value of "nothing" if it's not defined:
<%
something = 'nothing' if local_assigns.has_key? :something
%>