associationist 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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: b0bc8ea37a255d5c211067c307e3d3631837eadc
4
- data.tar.gz: 592aed6acd9b5384034cfe8dcd7576b363517696
3
+ metadata.gz: 4c677453494e691f75964f69bcb31bf51c570ca8
4
+ data.tar.gz: 32d6145dcc5dba97839d56c5a0120bbf186fdc74
5
5
  SHA512:
6
- metadata.gz: 48e98734a36878f10ddc314047e60755e12e0d73a619032cccabc29297dbfa8aeae63981460a63b194c19a8f8f2b9e7fe614646d5cdf78b83cfaffb6099fa228
7
- data.tar.gz: 0d7b9212cff0d47d04d2f4828efccdf35bc80dc1fc28d7009e5c645358bdae3673adf255087067638e992756464507d961782e1705542cf2143120fa1b28c8b8
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
@@ -9,6 +9,10 @@ module Associationist
9
9
 
10
10
  end
11
11
 
12
+ def constructable?
13
+ false
14
+ end
15
+
12
16
  def config
13
17
  options[:associationist]
14
18
  end
@@ -1,3 +1,3 @@
1
1
  module Associationist
2
- VERSION = '0.0.1'
2
+ VERSION = '0.0.2'
3
3
  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.1
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-02 00:00:00.000000000 Z
11
+ date: 2018-04-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activerecord