conjoin 0.0.46 → 0.0.48
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/conjoin/active_record.rb +5 -1
- data/lib/conjoin/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c0063b493a2df86c0ab6510f511acf420d2bdcf2
|
4
|
+
data.tar.gz: 669cee75a6f85aeccce2033686e242f9911c8fea
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7c82d119e1bf9dbea9050e29e06cf2b88991db278da5989937b4d8a6540135ac112111129e39e9a8cc53bb541e0f82d64e57898ea8d1e01ef8edaf6709405417
|
7
|
+
data.tar.gz: 8cd4ceb259a7d15dabe0f161f599c6cfb90159641dfa64e9f4209bfe4fdb6bcf7b18fa37294e1bbb1ea92a2e49c4b622f7d31a1be01ebd311fddd7e7f5354b80
|
@@ -67,10 +67,14 @@ module Conjoin
|
|
67
67
|
def validate
|
68
68
|
end
|
69
69
|
|
70
|
-
def validates req_params
|
70
|
+
def validates req_params, opts = {}
|
71
71
|
req_params = req_params.is_a?(OpenStruct) ? req_params.to_hash : HashIndifferent.new(req_params)
|
72
72
|
@req_params = req_params
|
73
73
|
|
74
|
+
if as = opts.delete(:as)
|
75
|
+
add_creator_and_updater_for self, as, req_params
|
76
|
+
end
|
77
|
+
|
74
78
|
run_callbacks :validates do
|
75
79
|
self.attributes = req_params
|
76
80
|
valid?
|
data/lib/conjoin/version.rb
CHANGED