shadow_model 0.2.1 → 0.2.2
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: aa2e4498f41912b4007f8f6eec30ca960bacb884
|
4
|
+
data.tar.gz: 9cf8fad4b6222b2eadee1632961155068b579e3e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3e69b2bcdb761a752817d645cda407a9995e928b3d766083584aaf61ba54adb9471c1f639b2c8615dadfedb845234d2ffc087325fac27186abc39c0e93f7e9c0
|
7
|
+
data.tar.gz: 56c45f612993c3b4469e429e3e0e844fc5262610bdb3400d9f626823331c755f734b0c173382381d82faae5b43fb55136081e1bf1cf2ba81d1cd86eca157687f
|
@@ -1,8 +1,12 @@
|
|
1
1
|
class ::ActiveRecord::Associations::Builder::HasMany
|
2
|
-
|
3
|
-
|
2
|
+
if self.respond_to?(:valid_options=)
|
3
|
+
self.valid_options += [:shadow]
|
4
|
+
else
|
5
|
+
def valid_options_with_shadow_option
|
6
|
+
valid_options_without_shadow_option + [:shadow]
|
7
|
+
end
|
8
|
+
alias_method_chain :valid_options, :shadow_option
|
4
9
|
end
|
5
|
-
alias_method_chain :valid_options, :shadow_option
|
6
10
|
|
7
11
|
def build_with_shadow_option
|
8
12
|
reflection = build_without_shadow_option
|
data/lib/shadow_model/version.rb
CHANGED