directiverecord 0.1.24 → 0.1.25

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: 15593ea42289ab19de5a5b3d79a4a73a3c1b26bc
4
- data.tar.gz: 5c54c1040ccbf78cff3c4bd86c176b4b8966ff96
3
+ metadata.gz: 5542ba11ccbf51ecb247505811188c00fd200e83
4
+ data.tar.gz: c2f672c63f3d1d8ff021337ef5ef6e75bd334157
5
5
  SHA512:
6
- metadata.gz: c79a81ea790365f31a76c1b3528d4537e3ee0c4646033406ff1c9b195239d33aef03a7134cee50336fbb37ddc86fc60b59749b01db24d76cb1b2069b1e9064ae
7
- data.tar.gz: 80d924a264d36962941a8994d691f28331c71d5b8e90879e127d4dddeebfdbea54f20179fae09acb675da2cb5c22b0ff7efbe165b404d7170d472e0164b9daae
6
+ metadata.gz: 3984980a4f9574c032c46e84dba0d638534ff1906956ac235839f215b71be7e16bbfe7dbeb1a66804a8db010bd292fd82480d19f103cc6a4c042e1db5eb48b25
7
+ data.tar.gz: edcdfaebee1ab54f5ebcf528751b7439fd74bbd628760530649bd59aadc962f00a7dafb5c742c68faa6545e0fa73a6c3336c1dbd1d508feddda3a5be6c97ae0a
data/CHANGELOG.rdoc CHANGED
@@ -1,5 +1,9 @@
1
1
  = DirectiveRecord CHANGELOG
2
2
 
3
+ == Version 0.1.25 (May 20, 2015)
4
+
5
+ * Not assuming that an ActiveRelation where value contains a table alias to a corresponding association
6
+
3
7
  == Version 0.1.24 (April 20, 2015)
4
8
 
5
9
  * Properly getting BigQuery dataset from options
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.24
1
+ 0.1.25
@@ -29,7 +29,8 @@ module DirectiveRecord
29
29
  sql_alias, column = $2, $3
30
30
 
31
31
  path = sql_alias_to_path sql_alias
32
- reflection = klass.reflections[sql_alias_to_association(sql_alias, klass).to_sym]
32
+ association = sql_alias_to_association(sql_alias, klass)
33
+ reflection = klass.reflections[association.to_sym] if association
33
34
 
34
35
  if reflection && (reflection.macro == :has_and_belongs_to_many) && (reflection.join_table == sql_alias) && (reflection.association_foreign_key == column)
35
36
  column = "id"
@@ -1,7 +1,7 @@
1
1
  module DirectiveRecord
2
2
  MAJOR = 0
3
3
  MINOR = 1
4
- TINY = 24
4
+ TINY = 25
5
5
 
6
6
  VERSION = [MAJOR, MINOR, TINY].join(".")
7
7
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: directiverecord
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.24
4
+ version: 0.1.25
5
5
  platform: ruby
6
6
  authors:
7
7
  - Paul Engel
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-04-20 00:00:00.000000000 Z
11
+ date: 2015-05-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activerecord