associationist 0.0.1 → 0.0.2
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
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4c677453494e691f75964f69bcb31bf51c570ca8
|
4
|
+
data.tar.gz: 32d6145dcc5dba97839d56c5a0120bbf186fdc74
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: baa71bfc317a28311ce5fc555bab2b7a370314ab3803b4551e51af1e7cab49370ffbaedfbadc2ca2271c840797ef45fe92dd17a9251516ef0148c229e60c1946
|
7
|
+
data.tar.gz: 3dd0780d1b8a0928af9b73c8e2754f1200ee62219e7dd4e2bc166a621a45ec5a8b490070d3af3d7db2b5a50586d2dbaacae513253f4f57c32ee5c25aa50e17ea
|
@@ -10,8 +10,6 @@ module Associationist
|
|
10
10
|
mixin = model.generated_association_methods
|
11
11
|
name = reflection.name
|
12
12
|
|
13
|
-
define_constructors(mixin, name) if reflection.constructable?
|
14
|
-
|
15
13
|
mixin.class_eval <<-CODE, __FILE__, __LINE__ + 1
|
16
14
|
def reload_#{name}
|
17
15
|
association(:#{name}).force_reload_reader
|
@@ -19,11 +17,14 @@ module Associationist
|
|
19
17
|
CODE
|
20
18
|
end
|
21
19
|
|
20
|
+
def self.define_callbacks(model, reflection)
|
21
|
+
# bypass dependent callback and autosave callback
|
22
|
+
end
|
23
|
+
|
22
24
|
def self.create_reflection(model, name, scope, options, extension = nil)
|
23
25
|
raise ArgumentError, "association names must be a Symbol" unless name.kind_of?(Symbol)
|
24
26
|
|
25
27
|
validate_options(options)
|
26
|
-
|
27
28
|
scope = build_scope(scope, extension)
|
28
29
|
Reflection::SingularReflection.new(name, scope, options, model)
|
29
30
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: associationist
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- CicholGricenchos
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-04-
|
11
|
+
date: 2018-04-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activerecord
|