Skip to content

Instantly share code, notes, and snippets.

@xionon
Created November 19, 2015 19:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save xionon/f98fa2c5e047e756c7dc to your computer and use it in GitHub Desktop.
Save xionon/f98fa2c5e047e756c7dc to your computer and use it in GitHub Desktop.
class PostsController < ApplicationController
def show
@post = Post.find(params[:id])
respond_to do |format|
format.html # GET /posts/1
format.json { render :json => @post } # GET /posts/1.json
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment