I want my partial below to get the classy class from it being injected through locals, but I keep getting undefined method for classy.
//view
<%= render layout: "layouts/partial", locals: {className: "classy"} do %>
...
<% end>
//partial
<div class="regular-div <%=className if className?%>"></div>
classNameand also referencingclassName. Are you sure this is not just a typo or sloppy error?classNameis not getting into the partial as "classy". I want my div to get the class "classy"<%= className if local_assigns.has_key?(:className) %>. SinceclassNameandclassName?are not the same.local_assigns.has_key?(:className)is a way of safely checking if the local variable is set.