Skip to content

Instantly share code, notes, and snippets.

View eliang's full-sized avatar

Edwin Liang eliang

  • Toronto, Ontario, Canada
View GitHub Profile

Keybase proof

I hereby claim:

  • I am eliang on github.
  • I am edwinliang (https://keybase.io/edwinliang) on keybase.
  • I have a public key ASAeHS_fv_ql8v0_7zCUyd9zwPvvFJnA_OF6xHYgFrV2xAo

To claim this, I am signing this object:

@eliang
eliang / active_model_serializer_issue.rb
Last active December 18, 2015 17:30
ActiveModelSerializer does not show models nested 2-deep
class Api::V1::OrganizationsController < Api::V1::BaseController
def index
@organizations = Organization.where("1=1").includes(facilities: [:floors, :units])
render json: @organizations, each_serializer: Api::V1::OrganizationSerializer, include: { facilities: { include: [:floors, :units]}}
end
end
module Api