ranked-model 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- data/Readme.mkd +1 -1
- data/lib/ranked-model/ranker.rb +1 -2
- data/lib/ranked-model/version.rb +1 -1
- metadata +4 -4
data/Readme.mkd
CHANGED
@@ -107,7 +107,7 @@ as possible: ranks are stored as a number between -8388607 and 8388607 (the MEDI
|
|
107
107
|
When an item is given a new position, it assigns itself a rank number between two neighbors.
|
108
108
|
This allows several movements of items before no digits are available between two neighbors. When
|
109
109
|
this occurs, ranked-model will try to shift other records out of the way. If items can't be easily
|
110
|
-
shifted anymore, it will rebalance the distribution of rank numbers across all
|
110
|
+
shifted anymore, it will rebalance the distribution of rank numbers across all members
|
111
111
|
of the ranked group.
|
112
112
|
|
113
113
|
Contributing
|
data/lib/ranked-model/ranker.rb
CHANGED
@@ -234,8 +234,7 @@ module RankedModel
|
|
234
234
|
def current_last
|
235
235
|
@current_last ||= begin
|
236
236
|
if (ordered_instance = finder.
|
237
|
-
|
238
|
-
order( instance.class.arel_table[ranker.column].desc ).
|
237
|
+
reverse.
|
239
238
|
first)
|
240
239
|
RankedModel::Ranker::Mapper.new ranker, ordered_instance
|
241
240
|
end
|
data/lib/ranked-model/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ranked-model
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
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
|
+
date: 2012-09-04 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: activerecord
|
@@ -151,7 +151,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
151
151
|
version: '0'
|
152
152
|
segments:
|
153
153
|
- 0
|
154
|
-
hash: -
|
154
|
+
hash: -4485783404028753486
|
155
155
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
156
156
|
none: false
|
157
157
|
requirements:
|
@@ -160,7 +160,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
160
160
|
version: '0'
|
161
161
|
segments:
|
162
162
|
- 0
|
163
|
-
hash: -
|
163
|
+
hash: -4485783404028753486
|
164
164
|
requirements: []
|
165
165
|
rubyforge_project:
|
166
166
|
rubygems_version: 1.8.24
|