active_mappers 1.4.6 → 1.4.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/active_mappers.gemspec +2 -2
- data/lib/active_mappers.rb +2 -2
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d9c952cdc3025177afc55d21f7967db40c7dad0fee5209701332433978d00c65
|
4
|
+
data.tar.gz: dae057bb4874202b6534ca59d7c0e11ca3765863ed27c9ddd1b83e64baa4bb41
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4fae6b5c455eb0c8eb1798a94dfac64b3bcc8cc82df6761f8669e9f574fdc3efc8e51bcfd862abf9a9293601bf28e8ea2642b55e13ba4a17f4af05efde430085
|
7
|
+
data.tar.gz: 339571d128963541e8ba5ee0bde89b688b17b409169e03cecdc0afc3787d9b3fe4203a91ec1de32f32a7b87dde75b3d9d3079965934c8383df27f5aaa3b77a13
|
data/active_mappers.gemspec
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
Gem::Specification.new do |s|
|
2
2
|
s.name = 'active_mappers'
|
3
|
-
s.version = '1.4.
|
4
|
-
s.date = '2020-11-
|
3
|
+
s.version = '1.4.7'
|
4
|
+
s.date = '2020-11-12'
|
5
5
|
s.summary = 'Slick, fast view layer for you Rails API.'
|
6
6
|
s.description = 'Fast, simple, declarative way to design your API\'s view layer'
|
7
7
|
s.authors = ['Michaël Villeneuve']
|
data/lib/active_mappers.rb
CHANGED
@@ -49,9 +49,9 @@ module ActiveMappers
|
|
49
49
|
else
|
50
50
|
relation_class_name = resource.class&.reflect_on_association(options[:optional_path] || key)&.class_name
|
51
51
|
raise "undefined relation : #{key.to_s}" if (mapper.nil? && relation_class_name.nil?)
|
52
|
-
KeyTransformer.resource_class_to_mapper(relation_class_name, self)
|
52
|
+
KeyTransformer.resource_class_to_mapper(relation_class_name.dup, self)
|
53
53
|
end
|
54
|
-
|
54
|
+
|
55
55
|
raise "'#{mapper_to_use.name}' should be a mapper" unless mapper_to_use.ancestors.map(&:to_s).include?("ActiveMappers::Base")
|
56
56
|
|
57
57
|
{ key => mapper_to_use.with(path.to_s.split('.').inject(resource, :try), default_options.merge(options)) }
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: active_mappers
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.4.
|
4
|
+
version: 1.4.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Michaël Villeneuve
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-11-
|
11
|
+
date: 2020-11-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|