Skip to content

Instantly share code, notes, and snippets.

@kmelkon
Last active December 21, 2015 17:09
Show Gist options
  • Save kmelkon/6338927 to your computer and use it in GitHub Desktop.
Save kmelkon/6338927 to your computer and use it in GitHub Desktop.
<address>
<%= deal.value %><br>
<%= deal.background %><br>
</address>
<div class="no-radio">
<div class="btn-group" data-toggle="buttons-radio">
<%= form_tag status_deal_path(deal), :remote => true, :class => "deals_status" do %>
<%= radio_button_tag :state, "won"+deal.id.to_s, deal.state == "won", :class => "toggle-btn-left toggle-btn" %>
<%= label_tag 'state_won'+deal.id.to_s, "won", :class=>"btn" %>
<%= radio_button_tag :state, "lost"+deal.id.to_s, deal.state == 'lost', :class => "toggle-btn-center toggle-btn" %>
<%= label_tag 'state_lost'+deal.id.to_s, "lost",:class=>"btn" %>
<%= radio_button_tag :state, "pending"+deal.id.to_s, deal.state == 'pending',:class => "toggle-btn-right toggle-btn" %>
<%= label_tag 'state_pending'+deal.id.to_s, "pending", :class=>"btn" %>
<% end %>
</div>
</div>
<% @deals.each do |deal| %>
<%= render 'deals/deal', :locals => {:deal => @deal} %>
<% end %>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment