Module: Testimonials::PromptHelper

Defined in:
lib/testimonials/prompt_helper.rb

Overview

Included into the host's controllers. Call testimonial_prompt! at your app's success moments — subscription renewed, tenth invoice sent, big milestone hit. The widget auto-opens on the next rendered page if the throttle allows, so calling this liberally is safe: users who submitted, recently dismissed, or were already prompted max_prompts times are left alone.

Instance Method Summary collapse

Instance Method Details

#testimonial_prompt!(kind = :testimonial) ⇒ Object



11
12
13
# File 'lib/testimonials/prompt_helper.rb', line 11

def testimonial_prompt!(kind = :testimonial)
  flash[:testimonials_prompt] = kind.to_s
end