diff options
Diffstat (limited to 'app/controllers/web_hooks_controller.rb')
| -rw-r--r-- | app/controllers/web_hooks_controller.rb | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/app/controllers/web_hooks_controller.rb b/app/controllers/web_hooks_controller.rb index 03b89cd..8e72609 100644 --- a/app/controllers/web_hooks_controller.rb +++ b/app/controllers/web_hooks_controller.rb @@ -12,7 +12,7 @@ class WebHooksController < ApplicationController end def create - @web_hook = @project.web_hooks.new(params[:web_hook]) + @web_hook = @project.web_hooks.new(web_hook_params) @web_hook.save if @web_hook.valid? @@ -44,4 +44,8 @@ class WebHooksController < ApplicationController def project @project = Project.find(params[:project_id]) end + + def web_hook_params + params.require(:web_hook).permit(:url) + end end |
