azahara_schema 0.3.0 → 0.3.1

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
  SHA256:
3
- metadata.gz: 5524a5493e19e41523f7e1bc68d332d60f8632b135eb332f2d0c647e7b078123
4
- data.tar.gz: f6b312c7ce2da1b2eb24d4d0fda8c1f197816862014444f97e6285936c546555
3
+ metadata.gz: fea304469865cc54d62c3a21a1e9c0dd170ab1b4997a11432e1807ff1b637091
4
+ data.tar.gz: 22120ff30c2f02383c81f5a76c920de32fd69755e456e3be005919386664b584
5
5
  SHA512:
6
- metadata.gz: c5f2e34b86aa21762d72af69f1a214af3b8418aee16dfa224cbda52b3cb1b74d6b24f216286f1384769a1825e3e9904ccbe7662c92e23e9ed1824d01ec66630a
7
- data.tar.gz: 2339248d1a7a6cfce3b92ca2e6ca8bfd214ae884a037cbb342b29135fb062b0cfdecd7a5d8b20c5d0317d5ba0b0cc263bbd27da57c1bfc5e462e1e578cac7e34
6
+ metadata.gz: 4c30d57a0b72116c2c0bd88c65eae05f81c66b14f88e7af9eca8dcc0bde933cb9cdcfc32a1d9742b093a853c40e09aad4d368756634cdaa1000402d557c14a5f
7
+ data.tar.gz: 30c42413edeacf575ca4e5d70cd6f51258c25423839ec4f892972ece456404c44519121c5f9de84d40f57d5ef87d55a4133940c0cf67c90cd7c91f43d8d025be
@@ -66,7 +66,7 @@ module AzaharaSchema
66
66
  else
67
67
  raise 'Unknown macro ' + association.macro.to_s
68
68
  end
69
- attribute.arel_join( joined )
69
+ attribute.arel_join( joined, join_type )
70
70
  end
71
71
 
72
72
  def arel_statement(operator, values)
@@ -79,6 +79,13 @@ module AzaharaSchema
79
79
  super(add_join(scope), operator, values)
80
80
  end
81
81
 
82
+ def arel_join(parent=nil, join_type=::Arel::Nodes::OuterJoin, a_tbl=self.arel_table(self.table_alias))
83
+ parent ||= self.arel_table(nil)
84
+ joined = parent
85
+ attributes.each{|a| joined = a.arel_join(joined, join_type) }
86
+ joined
87
+ end
88
+
82
89
  def add_join(scope)
83
90
  attributes.each{|a| scope = a.add_join(scope) }
84
91
  scope
@@ -1,3 +1,3 @@
1
1
  module AzaharaSchema
2
- VERSION = '0.3.0'
2
+ VERSION = '0.3.1'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: azahara_schema
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 0.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ondřej Ezr