hooks scaffold

This commit is contained in:
Dmitriy Zaporozhets 2012-01-04 02:07:56 +02:00
parent 495deea7eb
commit 2d3b6375f3
8 changed files with 40 additions and 7 deletions

View file

@ -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