Class: RailsClientChecker::CheckerController
- Inherits:
-
ApplicationController
- Object
- ApplicationController
- RailsClientChecker::CheckerController
- Defined in:
- app/controllers/rails_client_checker/checker_controller.rb
Instance Method Summary collapse
Instance Method Details
#check ⇒ Object
3 4 5 |
# File 'app/controllers/rails_client_checker/checker_controller.rb', line 3 def check render layout: false end |
#get_cookie ⇒ Object
16 17 18 19 20 21 22 23 |
# File 'app/controllers/rails_client_checker/checker_controller.rb', line 16 def ret = {} if params[:key].present? ret[params[:key]] = [params[:key]] .delete params[:key] end render json: ret end |
#set_cookie ⇒ Object
7 8 9 10 11 12 13 14 |
# File 'app/controllers/rails_client_checker/checker_controller.rb', line 7 def if params[:key].present? && params[:val].present? [params[:key]] = params[:val] render json: {status: 'OK'} else render status: :bad_request, json: {status: 'Missing key or val'} end end |