Sha256: 7331ecc9706ba5a39ff43027be91bbaba38709956defc98441c848d60f3567d3
Contents?: true
Size: 584 Bytes
Versions: 2
Compression:
Stored size: 584 Bytes
Contents
require 'jbuilder' class Api::PostsApi < Api::BaseApi def v1(posts) Jbuilder.encode do |json| json.api_version 'v1' json.posts posts do |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 |post| timestamps json, post json.name post.name json.teaser post.teaser json.content post.content end end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
api_versioning-0.0.9 | test/dummy/app/models/api/posts_api.rb |
api_versioning-0.0.8 | test/dummy/app/models/api/posts_api.rb |