lib/meducation_sdk/resources/vote.rb in meducation_sdk-1.4.3 vs lib/meducation_sdk/resources/vote.rb in meducation_sdk-1.4.4

- old
+ new

@@ -1,11 +1,11 @@ module MeducationSDK - class Vote < Loquor::Resource + class Vote < Resource self.path = "/votes" def item - @item ||= "MeducationSDK::#{item_type.gsub("::", "")}".constantize.find(item_id) + @item ||= class_for(item_type).find(item_id) end def user @user ||= User.find(user_id) end @@ -15,10 +15,10 @@ extend Loquor::ResourceMock self.attributes = { id: 1, user_id: 8, - item_id: 5, + item_id: 5, item_type: "MediaFile", liked: true } end end