Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: e7e72aa253
Fetching contributors…

Cannot retrieve contributors at this time

21 lines (15 sloc) 0.283 kb
class PostsController < ApplicationController
def index
@posts = Post.all
end
def show
@post = Post.find(params[:id])
end
def new
end
def create
@post = Post.new(params[:post])
@post.save
redirect_to :action => :show, :id => @post.id
end
end
Jump to Line
Something went wrong with that request. Please try again.