lib/meducation_sdk/resources/comment.rb in meducation_sdk-0.9.0 vs lib/meducation_sdk/resources/comment.rb in meducation_sdk-0.10.0
- old
+ new
@@ -1,10 +1,10 @@
module MeducationSDK
class Comment < Loquor::Resource
self.path = "/comments"
def item
- @item ||= "MeducationSDK::#{item_type}".constantize.find(item_id)
+ @item ||= "MeducationSDK::#{item_type.gsub("::", "")}".constantize.find(item_id)
end
def user
@user ||= User.find(user_id)
end