conjoin 0.0.72 → 0.0.73
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/conjoin.gemspec +1 -0
- data/lib/conjoin.rb +2 -1
- data/lib/conjoin/active_record.rb +3 -1
- data/lib/conjoin/version.rb +1 -1
- metadata +15 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b92d5e4f6afdd4e67f7d35866a636ac26fd947e2
|
4
|
+
data.tar.gz: 0c108cffd19cbd47743ae4261a41a3098d88af11
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8a0d5c968fc216fe74ee01aa230bbf53fc4d70218969e62dec0c17f2bdcd365ebd20281db5165fe749cf1790d70ffc145c22cd8c28792d6d88a74eeb50d68110
|
7
|
+
data.tar.gz: 6469f1cd12b59bcf39ea2fff35fa374f7fc4fa985b158125c6bcd7c33a504457ef8e11d755f964ef892529f7531e895950dd16c919cafeeadeffd4bd5046cd33
|
data/conjoin.gemspec
CHANGED
@@ -20,6 +20,7 @@ Gem::Specification.new do |spec|
|
|
20
20
|
|
21
21
|
spec.add_dependency "cuba", "~> 3.1.1", '>= 3.1.1'
|
22
22
|
spec.add_dependency "cuba-sugar", "~> 0.3.0", '>= 0.3.0'
|
23
|
+
spec.add_dependency "dominate"
|
23
24
|
spec.add_dependency "rack_csrf", "~> 2.4.0", '>= 2.4.0'
|
24
25
|
spec.add_dependency "rack-protection", "~> 1.5.2", '>= 1.5.2'
|
25
26
|
spec.add_dependency "r18n-core", "~> 1.1.10", '>= 1.1.10'
|
data/lib/conjoin.rb
CHANGED
@@ -73,7 +73,7 @@ module Conjoin
|
|
73
73
|
end
|
74
74
|
|
75
75
|
def validates req_params, opts = {}
|
76
|
-
req_params
|
76
|
+
req_params = req_params.to_h
|
77
77
|
@req_params = req_params
|
78
78
|
|
79
79
|
if as = opts.delete(:as)
|
@@ -129,6 +129,7 @@ module Conjoin
|
|
129
129
|
return unless current_params
|
130
130
|
# loop through associated records
|
131
131
|
current_params.each do |name, value|
|
132
|
+
name = name.to_s
|
132
133
|
if name.end_with?("_attributes")
|
133
134
|
associated_name = name.gsub(/_attributes$/, '')
|
134
135
|
associated_model = model.try associated_name
|
@@ -141,6 +142,7 @@ module Conjoin
|
|
141
142
|
elsif associated_model.kind_of? ActiveRecord::Associations::CollectionProxy
|
142
143
|
new_current_params = current_params[name]
|
143
144
|
associated_model.each_with_index do |current_model, i|
|
145
|
+
new_current_params ||= []
|
144
146
|
add_creator_and_updater_for current_model, current_user, new_current_params[i]
|
145
147
|
end
|
146
148
|
end
|
data/lib/conjoin/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: conjoin
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.73
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- cj
|
@@ -50,6 +50,20 @@ dependencies:
|
|
50
50
|
- - ">="
|
51
51
|
- !ruby/object:Gem::Version
|
52
52
|
version: 0.3.0
|
53
|
+
- !ruby/object:Gem::Dependency
|
54
|
+
name: dominate
|
55
|
+
requirement: !ruby/object:Gem::Requirement
|
56
|
+
requirements:
|
57
|
+
- - ">="
|
58
|
+
- !ruby/object:Gem::Version
|
59
|
+
version: '0'
|
60
|
+
type: :runtime
|
61
|
+
prerelease: false
|
62
|
+
version_requirements: !ruby/object:Gem::Requirement
|
63
|
+
requirements:
|
64
|
+
- - ">="
|
65
|
+
- !ruby/object:Gem::Version
|
66
|
+
version: '0'
|
53
67
|
- !ruby/object:Gem::Dependency
|
54
68
|
name: rack_csrf
|
55
69
|
requirement: !ruby/object:Gem::Requirement
|