Class: SimpleSpamPrevent::CaptchaController
- Inherits:
-
ApplicationController
- Object
- ActionController::Base
- ApplicationController
- SimpleSpamPrevent::CaptchaController
- Defined in:
- app/controllers/simple_spam_prevent/captcha_controller.rb
Instance Method Summary collapse
Instance Method Details
#show_captcha ⇒ Object
3 4 |
# File 'app/controllers/simple_spam_prevent/captcha_controller.rb', line 3 def show_captcha end |
#url_for(options = nil) ⇒ Object
17 18 19 |
# File 'app/controllers/simple_spam_prevent/captcha_controller.rb', line 17 def url_for =nil main_app.url_for end |
#verify_captcha ⇒ Object
6 7 8 9 10 11 12 13 14 15 |
# File 'app/controllers/simple_spam_prevent/captcha_controller.rb', line 6 def verify_captcha if simple_captcha_valid? session[:simple_spam_prevent] = {} if session[:simple_spam_prevent].nil? session[:simple_spam_prevent][:captcha_cleared] = true redirect_to :controller => "/#{session[:store_params][:controller]}", :action =>session[:store_params][:action] else flash.now[:error] = "Incorrect Captcha" render "show_captcha" end end |