Module: ActionController::Acts::RegPath::InstanceMethods

Defined in:
lib/reg_path/reg_path.rb

Overview

ClassMethods

Instance Method Summary collapse

Instance Method Details

#offersObject

Action responsible for navigating user through reg path. Will continually retrieve and display the next offer in the reg path. Posts to this action are submitted to the OfferEngine and any confirmation page returned by the OfferEngine is displayed inline. When no offers are returned, the after_reg_path callback or the method specified by the :after option to acts_as_reg_path is fired.



47
48
49
50
51
52
53
# File 'lib/reg_path/reg_path.rb', line 47

def offers
  setup_omniture
  return if request.post? && handle_post

  more_offers = get_and_show_next_offer
  self.class.reg_path_setup_options[:after].to_proc.call(self) unless more_offers
end