cowtech-rails 2.1.0.3 → 2.2.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -53,6 +53,10 @@ module Cowtech
53
53
  where(:deleted_at.exists => false)
54
54
  end
55
55
 
56
+ def valid_object_id?(oid)
57
+ oid.blank? || BSON::ObjectId.legal?(oid)
58
+ end
59
+
56
60
  def __index_find(oid)
57
61
  oid.blank? ? nil : self.find(BSON::ObjectId(oid))
58
62
  rescue ::Mongoid::Errors::DocumentNotFound, BSON::InvalidObjectId
@@ -8,9 +8,9 @@ module Cowtech
8
8
  module Rails
9
9
  module Version
10
10
  MAJOR = 2
11
- MINOR = 1
11
+ MINOR = 2
12
12
  PATCH = 0
13
- BUILD = 3
13
+ BUILD = 0
14
14
 
15
15
  STRING = [MAJOR, MINOR, PATCH, BUILD].compact.join('.')
16
16
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cowtech-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.1.0.3
4
+ version: 2.2.0.0
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,11 +9,11 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2011-09-28 00:00:00.000000000Z
12
+ date: 2011-10-13 00:00:00.000000000Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: cowtech-extensions
16
- requirement: &70256362859540 !ruby/object:Gem::Requirement
16
+ requirement: &70335891140240 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ! '>='
@@ -21,7 +21,7 @@ dependencies:
21
21
  version: '0'
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *70256362859540
24
+ version_requirements: *70335891140240
25
25
  description: A general purpose Rails utility plugin.
26
26
  email: shogun_panda@me.com
27
27
  executables: []