Medium badge JSON API Rails

Learning Resources

Only editable by group admins

  • Last updated November 17, 2018 at 10:43 AM by hankish
  • Evidence visible to group members and anyone with the link
Share the learning resources which were the most useful to you during your process.
JSON API RB has a website which is definitely the best starting point:

One thing to keep in mind as you study is that we are using the JSON API Rails gem specifically, but that one depends on some other gems in the same group in order to work. We are specifically not using JSON API RB's Deserializer (it was just too broken to do what we wanted, so our deserializer is coded from scratch).

Once you've read through the basics you'll want to tour the repos and look at the code itself a little bit.

All posted evidence

I have try to watch as many videos as possible but lot of them where not interesting

Drifting Ruby

Episode 50 - Rails API - Active Model Serializer

class ApplicationSerializer < ActiveModel::Serializer include Rails.application.routes.url_helpers default_url_options[:host] = '' end class UserSerializer < ApplicationSerializer attributes :id, :first_name, :last_name, :show attribute :email, if: :current_user attribute :edit_link, if: :current_user_is_owner has_many :phones def show UsersController.render(:show, assigns: { user: object}, layout: false ).squish end def edit_link edit_user_url(object) end def current_user_is_owner scope == object end end class PhoneSerializer < ApplicationSerializer attributes :name, :phone_number end
Small couentine couentine Almost 2 years ago