couchdb_acts_as_list 0.0.1.2 → 0.0.1.3

Sign up to get free protection for your applications and to get access to all the features.
data/README.md CHANGED
@@ -36,3 +36,7 @@ locale.insert_at 2
36
36
  3. Commit your changes (`git commit -am 'Add some feature'`)
37
37
  4. Push to the branch (`git push origin my-new-feature`)
38
38
  5. Create new Pull Request
39
+
40
+ #TODO:
41
+
42
+ # Add scope support.
@@ -1,3 +1,3 @@
1
1
  module CouchdbActsAsList
2
- VERSION = "0.0.1.2"
2
+ VERSION = "0.0.1.3"
3
3
  end
@@ -13,7 +13,7 @@ module CouchdbActsAsList
13
13
 
14
14
 
15
15
  def insert_at pos
16
- pos = [[pos.to_i, Locale.count].min, 1].max
16
+ pos = [[pos.to_i, self.class.count].min, 1].max
17
17
  decrement_positions_on_lower_items self.position
18
18
  self.update_attributes position: nil
19
19
  increment_positions_on_lower_items pos
@@ -22,7 +22,7 @@ module CouchdbActsAsList
22
22
 
23
23
  private
24
24
  def set_position
25
- self.position = Locale.count + 1
25
+ self.position = self.class.count + 1
26
26
  end
27
27
 
28
28
  def reorder_lower_items
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: couchdb_acts_as_list
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1.2
4
+ version: 0.0.1.3
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: 2012-12-25 00:00:00.000000000 Z
12
+ date: 2013-07-10 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rspec
@@ -98,7 +98,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
98
98
  version: '0'
99
99
  requirements: []
100
100
  rubyforge_project:
101
- rubygems_version: 1.8.24
101
+ rubygems_version: 1.8.25
102
102
  signing_key:
103
103
  specification_version: 3
104
104
  summary: Implementation of the acts as list gem for CouchDB