diff --git a/lib/fb_graph2/attribute_assigner.rb b/lib/fb_graph2/attribute_assigner.rb index e64dba8..7186446 100644 --- a/lib/fb_graph2/attribute_assigner.rb +++ b/lib/fb_graph2/attribute_assigner.rb @@ -70,6 +70,10 @@ module FbGraph2 end when :user User.new raw[:id], raw + when :users + Collection.new(raw).collect do |_raw_| + User.new _raw_[:id], _raw_ + end else # NOTE: handle these attributes in each class next diff --git a/lib/fb_graph2/page.rb b/lib/fb_graph2/page.rb index 3672556..80b968a 100644 --- a/lib/fb_graph2/page.rb +++ b/lib/fb_graph2/page.rb @@ -36,7 +36,7 @@ module FbGraph2 page: [:best_page], photo: [:cover], users: [ - # NOTE: only as Struct::Work#projects + # NOTE: only as Struct::Education#classes and Struct::Work#projects :with ], custom: [ diff --git a/lib/fb_graph2/struct/education.rb b/lib/fb_graph2/struct/education.rb index 6fed498..85a0d4a 100644 --- a/lib/fb_graph2/struct/education.rb +++ b/lib/fb_graph2/struct/education.rb @@ -4,7 +4,7 @@ module FbGraph2 register_attributes( raw: [:type], page: [:school, :year], - pages: [:concentration] + pages: [:classes, :concentration] ) end end