Sha256: 3c19f9b4c965d088434484440ee7f0b1cdc2106ee6d261dd8dc6e090e9e3d400

Contents?: true

Size: 307 Bytes

Versions: 39

Compression:

Stored size: 307 Bytes

Contents

module Saucy
  module Coupons
    extend ActiveSupport::Concern

    included do
      before_filter :set_coupon_cookie
    end

    def set_coupon_cookie
      if params[:coupon] && coupon = Coupon.find_by_name(params[:coupon])
        session[:coupon_name] ||= params[:coupon]
      end
    end
  end
end

Version data entries

39 entries across 39 versions & 1 rubygems

Version Path
saucy-0.16.1 lib/saucy/coupons.rb
saucy-0.16.0 lib/saucy/coupons.rb
saucy-0.15.2 lib/saucy/coupons.rb
saucy-0.15.1 lib/saucy/coupons.rb
saucy-0.15.0 lib/saucy/coupons.rb
saucy-0.14.5 lib/saucy/coupons.rb
saucy-0.14.3 lib/saucy/coupons.rb
saucy-0.10.10 lib/saucy/coupons.rb
saucy-0.14.2 lib/saucy/coupons.rb
saucy-0.14.1 lib/saucy/coupons.rb
saucy-0.14.0 lib/saucy/coupons.rb
saucy-0.13.3 lib/saucy/coupons.rb
saucy-0.13.2 lib/saucy/coupons.rb
saucy-0.10.9 lib/saucy/coupons.rb
saucy-0.10.8 lib/saucy/coupons.rb
saucy-0.13.1 lib/saucy/coupons.rb
saucy-0.13.0 lib/saucy/coupons.rb
saucy-0.12.5 lib/saucy/coupons.rb
saucy-0.12.4 lib/saucy/coupons.rb
saucy-0.12.3 lib/saucy/coupons.rb