vault-rails 0.0.5 → 0.0.6

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,5 +1,5 @@
1
1
  module Vault
2
2
  module Rails
3
- VERSION = "0.0.5"
3
+ VERSION = "0.0.6"
4
4
  end
5
5
  end
@@ -67,7 +67,7 @@ class Vault
67
67
  'find': (id) =>
68
68
  for object in @objects
69
69
  for sub_object in object[sub_collection]
70
- if sub_object[@options.id_attribute] is parseInt(id)
70
+ if sub_object[@options.id_attribute].toString() is id.toString()
71
71
  return sub_object
72
72
 
73
73
  # Object with specified id couldn't be found.
@@ -109,7 +109,7 @@ class Vault
109
109
  # Find an object in the collection using its id.
110
110
  find: (id) ->
111
111
  for object in @objects
112
- if object[@options.id_attribute] == parseInt(id)
112
+ if object[@options.id_attribute].toString() is id.toString()
113
113
  return object
114
114
 
115
115
  # Object with specified id couldn't be found.
@@ -268,7 +268,7 @@ class Vault
268
268
 
269
269
  # Update the object with the attributes sent from the server.
270
270
  object.update data, object.id
271
-
271
+
272
272
  object.status = "clean"
273
273
  @dirty_object_count--
274
274
  error: =>
@@ -404,7 +404,7 @@ class Vault
404
404
  # Find functionality.
405
405
  object[sub_collection].find = (id) =>
406
406
  for sub_collection_object in object[sub_collection]
407
- if sub_collection_object[@options.id_attribute] is parseInt(id)
407
+ if sub_collection_object[@options.id_attribute].toString() is id.toString()
408
408
  return sub_collection_object
409
409
 
410
410
  # Object with specified id couldn't be found.
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: vault-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.5
4
+ version: 0.0.6
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2011-11-23 00:00:00.000000000Z
12
+ date: 2011-11-24 00:00:00.000000000Z
13
13
  dependencies: []
14
14
  description: Store and manage collections of objects without a connection.
15
15
  email: