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.12.2 lib/saucy/coupons.rb
saucy-0.12.1 lib/saucy/coupons.rb
saucy-0.12.0 lib/saucy/coupons.rb
saucy-0.11.5 lib/saucy/coupons.rb
saucy-0.11.3 lib/saucy/coupons.rb
saucy-0.11.2 lib/saucy/coupons.rb
saucy-0.10.7 lib/saucy/coupons.rb
saucy-0.10.6 lib/saucy/coupons.rb
saucy-0.10.5 lib/saucy/coupons.rb
saucy-0.10.4 lib/saucy/coupons.rb
saucy-0.10.3 lib/saucy/coupons.rb
saucy-0.10.2 lib/saucy/coupons.rb
saucy-0.10.1 lib/saucy/coupons.rb
saucy-0.10.0 lib/saucy/coupons.rb
saucy-0.9.1 lib/saucy/coupons.rb
saucy-0.9.0 lib/saucy/coupons.rb
saucy-0.8.5 lib/saucy/coupons.rb
saucy-0.8.4 lib/saucy/coupons.rb
saucy-0.8.3 lib/saucy/coupons.rb