Class: QaptchasController
- Inherits:
-
ApplicationController
- Object
- ApplicationController
- QaptchasController
- Defined in:
- app/controllers/qaptchas_controller.rb
Overview
qaptchas_controller.rb
rails_qaptcha
Created by Zhang Alex on 2011-06-27.
Copyright 2011 [email protected]__. All rights reserved.
Instance Method Summary collapse
Instance Method Details
#check ⇒ Object
11 12 13 14 15 16 17 18 19 20 21 22 23 24 |
# File 'app/controllers/qaptchas_controller.rb', line 11 def check iqaptcha = params[:iQapTcha] if iqaptcha.blank? session[:iQapTcha] = true msg = "Form can be submited!" else session[:iQapTcha] = false msg = "Form can not be submited!" end @result = {:check => session[:iQapTcha], :msg => msg} respond_to do |format| format.json { render :json => @result.to_json } end end |