What i want to do is
{ if seller.accounting_acc THEN 'all state are possible', IF seller doesn't have account_access THEN 'All state except sale/in-hand'}
Here's my code below
<% if current_user.seller? && current_user.accounting_access? %>
<%= select_tag :set_state, options_for_select(state_options_for_seller, "comment"), class: "form-control set_state", id: "prospect_form_set_state" %>
<% else %>
<%= select_tag :set_state, options_for_select(state_options_for_seller, "comment", disabled: "sale"), id: "prospect_form_set_state" %>
<% end %>
I am stack in this.
Aucun commentaire:
Enregistrer un commentaire