acts_as_ordinalized 0.1.3 → 0.1.4
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION +1 -1
- data/acts_as_ordinalized.gemspec +1 -1
- data/lib/acts_as_ordinalized.rb +1 -1
- metadata +3 -3
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.1.
|
1
|
+
0.1.4
|
data/acts_as_ordinalized.gemspec
CHANGED
data/lib/acts_as_ordinalized.rb
CHANGED
@@ -35,7 +35,7 @@ module ActsAsOrdinalized
|
|
35
35
|
if collection_or_object.respond_to?(:current_page) && collection_or_object.respond_to?(:per_page)
|
36
36
|
ordinal_base = (collection_or_object.current_page - 1) * collection_or_object.per_page + 1
|
37
37
|
end
|
38
|
-
if collection_or_object.
|
38
|
+
if collection_or_object.respond_to?(:each_with_index)
|
39
39
|
collection_or_object.each_with_index do |item, index|
|
40
40
|
item.ordinal_number = ordinal_base + index
|
41
41
|
end
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: acts_as_ordinalized
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 19
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 1
|
9
|
-
-
|
10
|
-
version: 0.1.
|
9
|
+
- 4
|
10
|
+
version: 0.1.4
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- mandaryn
|