hooks scaffold
This commit is contained in:
parent
495deea7eb
commit
2d3b6375f3
8 changed files with 40 additions and 7 deletions
|
@ -20,13 +20,12 @@ class HooksController < ApplicationController
|
|||
|
||||
def create
|
||||
@hook = @project.web_hooks.new(params[:hook])
|
||||
@hook.author = current_user
|
||||
@hook.save
|
||||
|
||||
if @hook.valid?
|
||||
redirect_to [@project, @hook]
|
||||
redirect_to project_hook_path(@project, @hook)
|
||||
else
|
||||
respond_with(@hook)
|
||||
render :new
|
||||
end
|
||||
end
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue