Sha256: 76d2719fd793b49ac453d2895ba90d6f6974e289437c0735a94758bb884f15eb

Contents?: true

Size: 235 Bytes

Versions: 5

Compression:

Stored size: 235 Bytes

Contents

class PostsController < ApplicationController
  respond_to :html, :json
  
  def index
    @posts = Post.published
    respond_with( @posts )
  end
  
  def show
    @post = Post.find( params[:id] )
    respond_with( @post )
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
engrave-1.0.0 app/controllers/posts_controller.rb
engrave-0.0.5 app/controllers/posts_controller.rb
engrave-0.0.4 app/controllers/posts_controller.rb
engrave-0.0.3 app/controllers/posts_controller.rb
engrave-0.0.2 app/controllers/posts_controller.rb