- the ruby source code generated by rails
- def show
- @post = Post.find(params[:id])
- respond_to do |format|
- format.html # show.html.erb
- format.json { render json: @post }
- end
- end
- format.html # show.html.erb
- format.json { render json: @post }
- format.json {
- counter = counter + 1
- render json: @post
- }