slugoid 0.0.5 → 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -9,6 +9,14 @@ This gem will help you generate slugs in an easy way
9
9
 
10
10
  So far it works with the Rails 3 version of Mongoid.
11
11
 
12
+ ### Attention
13
+
14
+ If you're using mongoid 2.0.0.rc.7 or less, you need to use version
15
+ *0.0.5*
16
+
17
+ When mongoid 2.0.0.rc.8 was released there was a change that prevented
18
+ backwards compatibility.
19
+
12
20
  # Installation
13
21
 
14
22
  ## Rails 3
@@ -90,4 +98,4 @@ The *find* behavior for the other Mongoid::Documents remains the same.
90
98
 
91
99
  [Crowd Interactive](http://www.crowdint.com) is an American web design and development company that happens to work in Colima, Mexico.
92
100
  We specialize in building and growing online retail stores. We don’t work with everyone – just companies we believe in. Call us today to see if there’s a fit.
93
- Find more info [here](http://www.crowdint.com)!
101
+ Find more info [here](http://www.crowdint.com)!
@@ -7,20 +7,20 @@ module Mongoid::Criterion::Optional
7
7
  #
8
8
  # where(:_id => some_id)
9
9
  #
10
- alias :id! :id
11
- def id(*ids)
10
+ alias :for_ids! :for_ids
11
+ def for_ids(*ids)
12
12
  unless ids.first.is_a?(BSON::ObjectId)
13
13
  ids.flatten!
14
14
  if ids.size > 1
15
15
  self.in(
16
- @klass.acts_as_slugoid_options[:store_as] => ::BSON::ObjectId.cast!(@klass, ids, @klass.primary_key.nil?)
16
+ @klass.acts_as_slugoid_options[:store_as] => ::BSON::ObjectId.cast!(@klass, ids, @klass.primary_key.nil?)
17
17
  )
18
18
  else
19
19
  @selector[@klass.acts_as_slugoid_options[:store_as]] = ids.first
20
20
  end
21
21
  self
22
22
  else
23
- id!(*ids)
23
+ for_ids!(*ids)
24
24
  end
25
25
  end
26
26
  end
@@ -1,5 +1,5 @@
1
1
  module Acts
2
2
  module Slugoid
3
- VERSION = "0.0.5"
3
+ VERSION = "0.1.0"
4
4
  end
5
5
  end
@@ -12,7 +12,7 @@ Gem::Specification.new do |s|
12
12
  s.summary = %q{Drop-in solution to pretty urls when using Mongoid}
13
13
  s.description = %q{Drop-in solution to pretty urls when using Mongoid}
14
14
 
15
- s.add_dependency('mongoid', '2.0.0.rc.7')
15
+ s.add_dependency('mongoid', '~>2.0.0.rc.8')
16
16
  s.add_development_dependency('shoulda', '~>2.11.3')
17
17
  s.add_development_dependency('bson_ext', '~>1.2.4')
18
18
 
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: slugoid
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 0.0.5
5
+ version: 0.1.0
6
6
  platform: ruby
7
7
  authors:
8
8
  - David Padilla
@@ -20,9 +20,9 @@ dependencies:
20
20
  requirement: &id001 !ruby/object:Gem::Requirement
21
21
  none: false
22
22
  requirements:
23
- - - "="
23
+ - - ~>
24
24
  - !ruby/object:Gem::Version
25
- version: 2.0.0.rc.7
25
+ version: 2.0.0.rc.8
26
26
  type: :runtime
27
27
  version_requirements: *id001
28
28
  - !ruby/object:Gem::Dependency