Class: PostsController

Inherits:
ApplicationController
  • Object
show all
Defined in:
app/controllers/posts_controller.rb

Instance Method Summary collapse

Instance Method Details

#indexObject



4
5
6
7
# File 'app/controllers/posts_controller.rb', line 4

def index
  @posts = Post.published
  respond_with( @posts )
end

#showObject



9
10
11
12
# File 'app/controllers/posts_controller.rb', line 9

def show
  @post = Post.find( params[:id] )
  respond_with( @post )
end