lib/facegroup/posting.rb in facegroup-0.2.1 vs lib/facegroup/posting.rb in facegroup-0.3.0
- old
+ new
@@ -12,10 +12,10 @@
load_data(data)
end
def self.find(id:)
posting_data = FaceGroup::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)