Sha256: 76bbfc09e12f657524952c38c7af87d4d03ef223378f7be9c665ecb886374a8e
Contents?: true
Size: 596 Bytes
Versions: 7
Compression:
Stored size: 596 Bytes
Contents
require 'jbuilder' class Api::PostsApi < Api::BaseApi def v1(posts) Jbuilder.encode do |json| json.api_version 'v1' json.posts posts do |json, post| timestamps json, post json.name post.name json.content post.content end end end def v1_1(posts) Jbuilder.encode do |json| json.api_version 'v1_1' json.posts posts do |json, post| timestamps json, post json.name post.name json.teaser post.teaser json.content post.content end end end end
Version data entries
7 entries across 7 versions & 1 rubygems