后台创建后跳转回主页

This commit is contained in:
yafei Lee 2012-07-21 19:21:44 +08:00
parent 1463dee352
commit ae15b53171
1 changed files with 1 additions and 1 deletions

View File

@ -16,7 +16,7 @@ class Admin::PostsController < ApplicationController
@post = Post.new( params[:post] )
if @post.save
flash[:notice] = "success!"
redirect_to :action=>:index
redirect_to root_path
else
flash[:alert] = "fail!"
render :action=>:new