lib/ncmb/object.rb in ncmb-ruby-client-0.1.7 vs lib/ncmb/object.rb in ncmb-ruby-client-0.2.0
- old
+ new
@@ -47,11 +47,11 @@
def deletable?
if self.acl.fields[:*][:write] == true
return true
end
return false unless NCMB.CurrentUser
- return false unless self.acl[NCMB.CurrentUser.objectId.to_sym]
- return false unless self.acl[NCMB.CurrentUser.objectId.to_sym][:write]
+ return false unless self.acl.fields[NCMB.CurrentUser.objectId.to_sym]
+ return false unless self.acl.fields[NCMB.CurrentUser.objectId.to_sym][:write]
true
end
def base_path
"/#{@@client.api_version}/classes/#{@name}"