Skip to content

Instantly share code, notes, and snippets.

@xdite
Created January 16, 2009 17:06
Show Gist options
  • Save xdite/48012 to your computer and use it in GitHub Desktop.
Save xdite/48012 to your computer and use it in GitHub Desktop.
def create
@post = Post.new(params[:post])
if @post.save
flash[:notice] = 'Post was successfully created.'
redirect_to blog_path(@post)
else
render :action => "new"
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment