System Hook: implemented

This commit is contained in:
Valeriy Sizov 2012-07-15 15:29:06 +03:00
parent c38578428b
commit f5908cef19
9 changed files with 100 additions and 10 deletions

View file

@ -11,12 +11,11 @@ class Admin::HooksController < ApplicationController
def create
@hook = SystemHook.new(params[:hook])
respond_to do |format|
if @hook.save
format.html { redirect_to admin_hooks_path, notice: 'Hook was successfully created.' }
else
format.html { render :index }
end
if @hook.save
redirect_to admin_hooks_path, notice: 'Hook was successfully created.'
else
@hooks = SystemHook.all
render :index
end
end