おいしい時間を支えるAPI設計 / Food Service Engineers Meetup #3

Ff07ba188f0dccc30e7a90a5ebd1a386?s=47 taogawa
June 14, 2017

おいしい時間を支えるAPI設計 / Food Service Engineers Meetup #3

2017/6/14 「Food Service Engineers Meetup #3 〜メキシカンナイト〜」での発表スライドです

Ff07ba188f0dccc30e7a90a5ebd1a386?s=128

taogawa

June 14, 2017
Tweet

Transcript

  1. 13.

    ෆඞཁͳ߲໨͕ଟ͍ render json: @user.as_json # => response # { #

    "id": 1, # "first_name": "hike", # "last_name": "kitch", # ...ͨ͘͞Μͷ߲໨͕ଓ͘ # } • ཉ͍͠ͷ͸idͱ໊લ͚ͩͳͷʹɾɾɾ
  2. 17.
  3. 20.
  4. 27.

    ѱ͍ྫ • ࢖ͬͯ͸͍͚ͳ͍ as_json render json: @user.as_json # => response

    # { # "id": 1, # "first_name": "hike", # "last_name": "kitch", # ... # "password_digest": "xxxxxxxxx" # !!!!! # }
  5. 29.

    ςϯϓϨʔτΤϯδϯ or SerializerΛ࢖͓͏ • ςϯϓϨʔτΤϯδϯ • Rabl • jbuilder •

    Serializer • ActiveModelSerializer -> ฐࣾͰ͸͜ΕΛ࢖͍· ͨ͠
  6. 38.

    after # /kitchens/:id class KitchensController < ApplicationController def show end

    end # /self/kitchens/:id class Self::KitchensController < ApplicationController def show end end