Commit d238a21bcb44d2f0fc7f027ccc19c613050f77e8

Authored by Dmitriy Zaporozhets
2 parents 38ae34a3 4cc2afdf

Merge pull request #6708 from skv-headless/fix_url_error_on_invalid_hook

Fix url generation error on hook invalid create
Showing 1 changed file with 1 additions and 1 deletions   Show diff stats
app/controllers/projects/hooks_controller.rb
... ... @@ -18,7 +18,7 @@ class Projects::HooksController < Projects::ApplicationController
18 18 if @hook.valid?
19 19 redirect_to project_hooks_path(@project)
20 20 else
21   - @hooks = @project.hooks
  21 + @hooks = @project.hooks.select(&:persisted?)
22 22 render :index
23 23 end
24 24 end
... ...