source_ids 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/source_ids/version.rb +1 -1
- data/lib/source_ids.rb +2 -0
- 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: 4cefbe74627840ff44a086a997e80f51dc479239
|
4
|
+
data.tar.gz: e91547f4d99e8f70d8f099e0955695d07521aa3d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f2a6433b0e8764ce9c71bc28f74307b4e1df5ba21559478b1b563821939e3840a93d7d94ead2665e9d4ab05578e278424d764f3584cfab2848015810d4d9012c
|
7
|
+
data.tar.gz: e38259a69f69ec6ae046f26955bc7e7dabfe2c78e42d370459e3bb18eeb2feeb73189d3647aaf030dfb56fbf3cd3b92eea288854f713c318823eddd58779c31c
|
data/lib/source_ids/version.rb
CHANGED
data/lib/source_ids.rb
CHANGED
@@ -16,6 +16,8 @@ module SourceIds
|
|
16
16
|
|
17
17
|
# _source_ids=
|
18
18
|
define_method "_#{source_ids_name}=" do |ids|
|
19
|
+
ids = ids.find_all(&:present?) # care for hidden field of collection_select
|
20
|
+
|
19
21
|
# mark destruction if not included in ids
|
20
22
|
send(relation.name).each do |r|
|
21
23
|
source_id = r.send(fk_in_relation)
|