forest_liana 1.3.26 → 1.3.27
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/controllers/forest_liana/application_controller.rb +1 -1
- data/app/services/forest_liana/resource_creator.rb +9 -1
- data/app/services/forest_liana/resource_updater.rb +11 -1
- data/app/services/forest_liana/schema_adapter.rb +2 -0
- data/lib/forest_liana/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: 2ddb202574c30f9a4a1300fffeb3165e61f010e7
|
4
|
+
data.tar.gz: 9e0f60e82a4e403761f0313ad07622982884f9b6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8139aadaea99125d909c345dac9f6e9fed6c198c4686a66ca73409f26ff17b8e2ea57f9cea96ec22b72fbe203c6982d4c85786e6ec63d405b0907d80a91bf026
|
7
|
+
data.tar.gz: 5cef679a4cf1d324ad292e31d7f9141286a5b8c95218c160641191a8fda8c3f2d37eb7c8202c09d16edd02d670594edfa6e9ce7699a5e122083f589a28df4309
|
@@ -8,7 +8,11 @@ module ForestLiana
|
|
8
8
|
end
|
9
9
|
|
10
10
|
def perform
|
11
|
-
|
11
|
+
if has_strong_parameter
|
12
|
+
@record = @resource.create(resource_params)
|
13
|
+
else
|
14
|
+
@record = @resource.create(resource_params, without_protection: true)
|
15
|
+
end
|
12
16
|
set_has_many_relationships
|
13
17
|
end
|
14
18
|
|
@@ -36,5 +40,9 @@ module ForestLiana
|
|
36
40
|
end
|
37
41
|
end
|
38
42
|
end
|
43
|
+
|
44
|
+
def has_strong_parameter
|
45
|
+
@resource.instance_method(:update_attributes!).arity == 1
|
46
|
+
end
|
39
47
|
end
|
40
48
|
end
|
@@ -9,7 +9,13 @@ module ForestLiana
|
|
9
9
|
|
10
10
|
def perform
|
11
11
|
@record = @resource.find(@params[:id])
|
12
|
-
|
12
|
+
|
13
|
+
if has_strong_parameter
|
14
|
+
@record.update_attributes!(resource_params)
|
15
|
+
else
|
16
|
+
@record.update_attributes!(resource_params, without_protection: true)
|
17
|
+
end
|
18
|
+
|
13
19
|
set_has_many_relationships
|
14
20
|
end
|
15
21
|
|
@@ -37,5 +43,9 @@ module ForestLiana
|
|
37
43
|
end
|
38
44
|
end
|
39
45
|
end
|
46
|
+
|
47
|
+
def has_strong_parameter
|
48
|
+
@resource.instance_method(:update_attributes!).arity == 1
|
49
|
+
end
|
40
50
|
end
|
41
51
|
end
|
data/lib/forest_liana/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: forest_liana
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.3.
|
4
|
+
version: 1.3.27
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sandro Munda
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-08-
|
11
|
+
date: 2016-08-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|