conjoin 0.0.71 → 0.0.72
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/conjoin.gemspec +0 -1
- data/lib/conjoin.rb +1 -2
- data/lib/conjoin/active_record.rb +1 -3
- data/lib/conjoin/version.rb +1 -1
- metadata +2 -16
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6ce076efde1f80dc8768b7f84f884cf4b6c6c1d7
|
4
|
+
data.tar.gz: 1b8a32ac5cb2b2cc431e5ba3aac90057abc6b45a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 56a5928a355b0c68775f7d56fdb5d82dc4cc0da25d5a9e150436e407f42fe957da3af0fae4c79afbd4aedcb1e39c50819526a66b154c8765c76ad27d949044d5
|
7
|
+
data.tar.gz: ce4381f8146100aa27e14fada5f3d59cbc6e64174586dbefd395b28ded6175db7e9a8c631fa0c1d8a8cbd1c6934f771a63bebd87069d6524b6a94ba2778d4ebf
|
data/conjoin.gemspec
CHANGED
@@ -20,7 +20,6 @@ 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"
|
24
23
|
spec.add_dependency "rack_csrf", "~> 2.4.0", '>= 2.4.0'
|
25
24
|
spec.add_dependency "rack-protection", "~> 1.5.2", '>= 1.5.2'
|
26
25
|
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.is_a?(OpenStruct) ? req_params.to_hash : HashIndifferent.new(req_params)
|
77
77
|
@req_params = req_params
|
78
78
|
|
79
79
|
if as = opts.delete(:as)
|
@@ -129,7 +129,6 @@ 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
|
133
132
|
if name.end_with?("_attributes")
|
134
133
|
associated_name = name.gsub(/_attributes$/, '')
|
135
134
|
associated_model = model.try associated_name
|
@@ -142,7 +141,6 @@ module Conjoin
|
|
142
141
|
elsif associated_model.kind_of? ActiveRecord::Associations::CollectionProxy
|
143
142
|
new_current_params = current_params[name]
|
144
143
|
associated_model.each_with_index do |current_model, i|
|
145
|
-
new_current_params ||= []
|
146
144
|
add_creator_and_updater_for current_model, current_user, new_current_params[i]
|
147
145
|
end
|
148
146
|
end
|
data/lib/conjoin/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
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.72
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- cj
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-06-
|
11
|
+
date: 2014-06-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: cuba
|
@@ -50,20 +50,6 @@ 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'
|
67
53
|
- !ruby/object:Gem::Dependency
|
68
54
|
name: rack_csrf
|
69
55
|
requirement: !ruby/object:Gem::Requirement
|