diff options
author | ThibG <thib@sitedethib.com> | 2018-09-11 20:09:00 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-09-11 20:09:00 +0200 |
commit | 82b521b4c306d75530795bce9f6c706359e7339e (patch) | |
tree | 4ac730d5c48dfd27703e33ffab034e3266f7e0ad /app/controllers/application_controller.rb | |
parent | 59de2868c13a61bce08923f841024fefebe3b3da (diff) | |
parent | f1214f00d990612229c753d8657944a10b9bf8a1 (diff) |
Merge pull request #724 from ThibG/glitch-soc/merge-upstream
Merge upstream changes
Diffstat (limited to 'app/controllers/application_controller.rb')
-rw-r--r-- | app/controllers/application_controller.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index 8ffc31bb4..dca6c5a5a 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -128,6 +128,10 @@ class ApplicationController < ActionController::Base protected + def truthy_param?(key) + ActiveModel::Type::Boolean.new.cast(params[key]) + end + def forbidden respond_with_error(403) end |