Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save glebd/295075 to your computer and use it in GitHub Desktop.
Save glebd/295075 to your computer and use it in GitHub Desktop.
From 02b88e175db3b18f781a9e3e0798943661b595e4 Mon Sep 17 00:00:00 2001
From: Gleb Dolgich <gleb@proggle.com>
Date: Sat, 7 Nov 2009 20:28:28 +0000
Subject: [PATCH] gave priority to coupon code via URL over session
---
app/views/store/order/new.rhtml | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/app/views/store/order/new.rhtml b/app/views/store/order/new.rhtml
index 5b5ce13..8af4e01 100755
--- a/app/views/store/order/new.rhtml
+++ b/app/views/store/order/new.rhtml
@@ -45,7 +45,7 @@ $(document).ready(function(){
<tr><td colspan="2"><div class="d"></div></td></tr>
<tr id="coupon_row">
<td>Coupon Code:</td>
- <td colspan="2"><%= text_field_tag 'coupon', session[:coupon_text] ||= params[:coupon], :autocomplete => 'off' %></td>
+ <td colspan="2"><%= text_field_tag 'coupon', params[:coupon] ||= session[:coupon_text], :autocomplete => 'off' %></td>
</tr>
<tr><td colspan="2"><div class="d" style="margin-top:15px"></div></td></tr>
<tr id="payment_method">
--
1.6.5.7.g9ecb2+GitX
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment