Sha256: 2b201256aaed8a653b7a95564e42fcbf7725a7ed40c9f679883ef2d7d7ff8187
Contents?: true
Size: 536 Bytes
Versions: 15
Compression:
Stored size: 536 Bytes
Contents
module Spree class Promotion::Rules::UserLoggedIn < PromotionRule def eligible?(order, options = {}) # this is tricky. We couldn't use any of the devise methods since we aren't in the controller. # we need to rely on the controller already having done this for us. # The thinking is that the controller should have some sense of what state # we should be in before firing events, # so the controller will have to set this field. return options && options[:user_signed_in] end end end
Version data entries
15 entries across 15 versions & 1 rubygems