Skip to content

Instantly share code, notes, and snippets.

@radar
Forked from kmelkon/_deal.html.erb
Last active December 21, 2015 17:09
Show Gist options
  • Save radar/6338522 to your computer and use it in GitHub Desktop.
Save radar/6338522 to your computer and use it in GitHub Desktop.
<%= form_tag status_deal_path(deal), :remote => true, :class => "deals_status" do %>
<%= radio_button_tag :state, "won", deal.state == "won", :class => "toggle-btn-left toggle-btn", :value =>"won" %>
<%= label_tag 'state_won', "won", :class=>"btn" %>
<%= radio_button_tag :state, "lost", deal.state == 'lost', :class => "toggle-btn-center toggle-btn",:value => "lost" %>
<%= label_tag 'state_lost', "lost",:class=>"btn" %>
<%= radio_button_tag :state, "pending", deal.state == 'pending',:class => "toggle-btn-right toggle-btn", :value => "pending" %>
<%= label_tag 'state_pending', "pending", :class=>"btn" %>
<% end %>
$('.deals-wrapper').append('<%= escape_javascript(render :partial => "deals/deal", :locals => {:deal => @deal}) %>');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment