Sha256: 42202f80fc4cf71bd76ffbf65510b36da3cd6b11f257fb32b20f08b67466ea80
Contents?: true
Size: 500 Bytes
Versions: 10
Compression:
Stored size: 500 Bytes
Contents
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
Version data entries
10 entries across 10 versions & 1 rubygems