Rails API in Rails 5

  • Published on
    16-Apr-2017

  • View
    622

  • Download
    3

Embed Size (px)

Transcript

<ul><li><p>RailsAPI in Rails 5</p><p>.rb #2Sansan (@yonda)</p></li><li><p>Sansan </p><p>github : yonda</p><p> : </p></li><li><p> .rb </p></li><li><p>Rails 5 Rails API </p></li><li><p>Rails API </p></li><li><p>Rails-API </p><p> Rails 5 rails-api Gem Rails </p><p> API scaffold </p></li><li><p>Usage</p><p>$ rails new --api</p></li><li><p> rails new </p></li><li><p>Gemfile</p><p> API Gem jbuilder active_model_serializers </p></li><li><p>Gemfile</p></li><li><p>jbuilder AMS</p><p> rails-api PR PR </p><p> :bow: rails-api gem AMS json-api AMS view </p><p> partial array object render AMS </p></li><li><p>config/application.rb</p><p>config.api_only = true</p><p> scaffold </p></li><li><p>rails g scaffold </p><p> controller json </p></li><li><p>Web View edit new </p></li><li><p>Controller </p></li><li><p>Serializer</p></li><li><p> API Rails </p><p> API AMS (AMS ) jbuilder </p><p> jbuilder AMS </p><p> view serializer </p></li></ul>