Skip to content

Instantly share code, notes, and snippets.

def create
@post = Post.new(params[:post])
if @post.save
redirect_to posts_path, :notice => 'Post saved!'
else
render "new"
end
end
def create
@post = Post.new(params[:post])
if @post.save
redirect_to posts_path, :notice => 'Post saved!'
else
render "new"
end
end
def create
@post = Post.new(params[:post])
if @post.save
redirect_to posts_path, :notice => 'Post saved!'
else
render "new"
end
end
def create
@post = Post.new(params[:post])
if @post.save
redirect_to posts_path, :notice => 'Post saved!'
else
render "new"
end
end
def create
@post = Post.new(params[:post])
if @post.save
redirect_to posts_path, :notice => 'Post saved!'
else
render "new"
end
end
def create
@post = Post.new(params[:post])
if @post.save
redirect_to posts_path, :notice => 'Post saved!'
else
render "new"
end
end
def create
@post = Post.new(params[:post])
if @post.save
redirect_to posts_path, :notice => 'Post saved!'
else
render "new"
end
end
def create
@post = Post.new(params[:post])
if @post.save
redirect_to posts_path, :notice => 'Post saved!'
else
render "new"
end
end
def create
@post = Post.new(params[:post])
if @post.save
redirect_to posts_path, :notice => 'Post saved!'
else
render "new"
end
end
def create
@post = Post.new(params[:post])
if @post.save
redirect_to posts_path, :notice => 'Post saved!'
else
render "new"
end
end