active_decorator_with_decorate_associations 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 00d55c76c85db0fbb13db08dc6896be8f695f667
|
4
|
+
data.tar.gz: 5bbdff17711628b08f133c2e9f697c30336596e0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 83b9bf7e7e7d3519eba7b0aae4dba6173dfa8f765104dd57faf4cdaf29bb1a1cabc02ae54ae488a3ca4ae225e205da20778c8890290bc19a0d1e255928d456b8
|
7
|
+
data.tar.gz: 3e1512c9951172ff4f47084b51ca148ba0feb832e974d28516d61ff47829eff64c0d1977a2329b4caf84a8287146977b331f6617eeb9057bdd6eba6d6171a7f0
|
@@ -9,7 +9,7 @@ Gem::Specification.new do |spec|
|
|
9
9
|
spec.author = "Tatsuya Itakura"
|
10
10
|
spec.email = "itkrt2y.591721200@gmail.com"
|
11
11
|
|
12
|
-
spec.summary = "active_decorator extension to decorate associated models
|
12
|
+
spec.summary = "active_decorator extension to decorate associated models"
|
13
13
|
spec.description = "Enable active_decorator to automatically decorate associated models"
|
14
14
|
spec.homepage = "https://github.com/itkrt2y/active_decorator_with_decorate_associations"
|
15
15
|
spec.license = "MIT"
|
@@ -5,15 +5,7 @@ module ActiveDecoratorWithDecorateAssociations
|
|
5
5
|
include Singleton
|
6
6
|
|
7
7
|
def decorate(target)
|
8
|
-
|
9
|
-
when Array
|
10
|
-
target.each do |t|
|
11
|
-
ActiveDecorator::Decorator.instance.decorate(t) unless t.is_a?(ActiveDecorator::Helpers)
|
12
|
-
end
|
13
|
-
else
|
14
|
-
ActiveDecorator::Decorator.instance.decorate(target) unless target.is_a?(ActiveDecorator::Helpers)
|
15
|
-
end
|
16
|
-
|
8
|
+
ActiveDecorator::Decorator.instance.decorate(target)
|
17
9
|
target
|
18
10
|
end
|
19
11
|
end
|