lib/kentaa/api/resources/resource.rb in kentaa-api-0.3.1 vs lib/kentaa/api/resources/resource.rb in kentaa-api-0.3.2
- old
+ new
@@ -17,9 +17,16 @@
elsif options.key?(:id)
@id = options.delete(:id)
end
end
+ def load
+ super
+ @id = data.fetch(:id) if data.key?(:id)
+
+ self
+ end
+
def created_at
Time.parse(data[:created_at]) if data[:created_at]
end
def updated_at