camerican / Help-Desk

Help Desk for NYCDA Projects
1 stars 1 forks source link

Form Submit changing a boolean attribute in a table. #11

Closed eSui closed 7 years ago

eSui commented 7 years ago

Find the Syntax Error!

  <% if current_user.orders.include?("<%= item.id %>")%>
        <%= link_to new_order_path(item: item.id) do %>
        <div class="p-image item_<%=item.id%> center-block" style='background-image: url("<%=item.image%>, opacity: 0.5")'></div>
        <% end %>
      <%else%>
        <%= link_to new_order_path(item: item.id) do %>
        <div class="p-image item_<%=item.id%>, center-block" style='background-image: url("<%=item.image%>")'></div>
        <% end %>
      <%end%>
camerican commented 7 years ago

We determined the syntax error was caused by nesting irb tags inside one another on the first line.