Created
April 18, 2017 21:01
-
-
Save jeanpaulsio/0e422031eeca56097779f30554adf315 to your computer and use it in GitHub Desktop.
Coupon Form - Before Refactor
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<%= form_for @coupon do |f| %> | |
<% if @coordinator.stripe_coupon %> | |
<%= @coordinator.stripe_coupon.id %> (<%= @coordinator.coupon_discount %>) | |
<% end %> | |
<%= f.text_field :stripe_id, placeholder: "#{ @coordinator.stripe_coupon ? 'Update Promo Code' : 'Promo Code'}", | |
value: "#{@coordinator.stripe_coupon ? @coordinator.stripe_coupon.id : nil }" %> | |
<%= f.submit "#{ @coordinator.stripe_coupon ? 'Update' : 'Save'}", class:'btn btn-info btn-block' %> | |
<% end %> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment