Merge pull request #6708 from skv-headless/fix_url_error_on_invalid_hook

Fix url generation error on hook invalid create
This commit is contained in:
Dmitriy Zaporozhets
2014-04-07 19:55:09 +03:00
+1 -1
View File
@@ -18,7 +18,7 @@ class Projects::HooksController < Projects::ApplicationController
if @hook.valid?
redirect_to project_hooks_path(@project)
else
@hooks = @project.hooks
@hooks = @project.hooks.select(&:persisted?)
render :index
end
end