matharvard (owner)

Revisions

gist: 158 Download_button fork
public
Description:
My blog examples.
Public Clone URL: git://gist.github.com/158.git
Embed All Files: show embed
post-6-example-1.rb #
1
2
3
4
5
6
7
8
9
10
11
def create
  @post = Post.new(params[:post])
 
  respond_to do |format|
    if @post.save
      format.html { redirect_to :back } # Send them to the previous page.
    else
      format.html { render :action => 'new' }
    end
  end
end