后台创建后跳转回主页
This commit is contained in:
parent
1463dee352
commit
ae15b53171
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue