draper-extensions 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/draper/extensions/active_relation.rb +6 -7
- data/lib/draper/extensions/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d171f0bbacf819871ebcdd18d7bf1450de23fa34
|
4
|
+
data.tar.gz: 25824f7b284ed3bbb797b9897f8d5328196069fd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ea1e93f89fa0160c7a94cf5e731fcc400270b418f61420deb824026cf00674fd7fb9d4295338bb834f343afb7816b103069e4b23c08bcd763f80926834421af1
|
7
|
+
data.tar.gz: 672b6629a94da927577841fca2d73361a5ed3508af235b14d71703d2c975d7f44f74a424ba12569f2fa29af125c3ad364b659a0593d395da195c2c3aaea139ca
|
@@ -3,13 +3,12 @@
|
|
3
3
|
## @products = listing.products.page(1).decorate
|
4
4
|
## @products => Draper::CollectionDecorator
|
5
5
|
|
6
|
-
if defined?(ActiveRecord)
|
7
|
-
ActiveRecord::VERSION::STRING.start_with?("4.") ||
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
klass.decorator_class.decorate_collection(self)
|
6
|
+
if defined?(ActiveRecord)
|
7
|
+
if ActiveRecord::VERSION::STRING.start_with?("4.") || ActiveRecord::VERSION::STRING.start_with?("3.2")
|
8
|
+
class ActiveRecord::Relation
|
9
|
+
def decorate
|
10
|
+
klass.decorator_class.decorate_collection(self)
|
11
|
+
end
|
13
12
|
end
|
14
13
|
end
|
15
14
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: draper-extensions
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Chamnap Chhorn
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-05-
|
11
|
+
date: 2014-05-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: draper
|