lib/message.rb in inbox-0.3.0 vs lib/message.rb in inbox-0.4.0
- old
+ new
@@ -14,24 +14,17 @@
attr_accessor :file_ids
attr_accessor :body
def inflate(json)
super
- @thread_id = json[:thread]
- @file_ids = json[:files] || []
+ @file_ids ||= []
@to ||= []
@cc ||= []
@bcc ||= []
end
- def as_json()
- json = super
- json[:files] = json[:file_ids]
- json
- end
-
def files
- @files ||= RestfulModelCollection.new(File, @_api, @namespace, {:message=>@id})
+ @files ||= RestfulModelCollection.new(File, @_api, @namespace_id, {:message_id=>@id})
end
end
end
\ No newline at end of file