Sha256: c4097699760f27ba3d635f17700d4ad0c59dc7f78bdaf5eaee7ab0cdb3fd6c0f
Contents?: true
Size: 277 Bytes
Versions: 9
Compression:
Stored size: 277 Bytes
Contents
class PostsController < ApplicationController def index @posts = Post.all respond_to do |format| format.json { render_json posts: @posts } end end def error respond_to do |format| format.json { render_api_error('Deliberate Error') } end end end
Version data entries
9 entries across 9 versions & 1 rubygems