about summary refs log tree commit diff
path: root/app/controllers/application_controller.rb
diff options
context:
space:
mode:
authorThibG <thib@sitedethib.com>2018-09-11 20:09:00 +0200
committerGitHub <noreply@github.com>2018-09-11 20:09:00 +0200
commit82b521b4c306d75530795bce9f6c706359e7339e (patch)
tree4ac730d5c48dfd27703e33ffab034e3266f7e0ad /app/controllers/application_controller.rb
parent59de2868c13a61bce08923f841024fefebe3b3da (diff)
parentf1214f00d990612229c753d8657944a10b9bf8a1 (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.rb4
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