lib/facegroups/posting.rb in facegroups-0.2.1 vs lib/facegroups/posting.rb in facegroups-0.2.2
- old
+ new
@@ -11,10 +11,10 @@
load_data(data)
end
def self.find(id:)
posting_data = FaceGroups::FbApi.posting_data(id)
- new(data: posting_data)
+ posting_data.keys.include?('error') ? nil : new(data: posting_data)
end
private
def load_data(posting_data)