mardi 23 mai 2017

Rails how to straight 3 row conditional?

I'm trying to direct the user to option 3 if option 1 or 2 are not used so i did: but when i check the page shows:

syntax error, unexpected keyword_ensure, expecting keyword_end

someone know why this syntax error?

   <%if order.dispute.status == "open" %>

        <li>  <%= button_to 'Dispute Open',  order_dispute_path(order), method: :get, class: 'btn_grey' %>
      </li>

    <% elsif %>
    <li>
    <%= button_to 'Dispute',  new_order_dispute_path(order), method: :get, class: 'btn_grey' %>


      </li>

    <% else %>
      <li>

        <%= button_to 'Dispute closed',  closed_order_dispute_path, method: :get, class: 'btn_grey' %>

      </li>

    <% end %>

Aucun commentaire:

Enregistrer un commentaire