activefacts 1.2.0 → 1.2.1

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: 8ed82ab2bf0c4e8d8dc9fce824d69e9fff87ab0b
4
- data.tar.gz: 03644b12bd3d6717a457a7526342b797966fb712
3
+ metadata.gz: 9375bff433eb3d5ca379bb09c75cf61dbf06d0f9
4
+ data.tar.gz: 0eb5ae1999ee3022eb304366dcff00d0416e5562
5
5
  SHA512:
6
- metadata.gz: 07c66c621a9009612baa4e90abfb03dfee833e8daba654089f75f80ee14fe2881aab1e7e9e90c0b55109f80e5472cc7a05bde2f9dc1d1534ae3357e4097bcf8a
7
- data.tar.gz: d10faaa64f3c03eacc742888310a0ddb88158e9de646c80c3176040e970bf61e5e67f6a81d014b7acc794b8c91bf27f874391ef0c6b7a66d6210176b10bf0171
6
+ metadata.gz: ea7c95187824dcbceb58d036483f63611d1ed079deea269b53b1f52b0a1db53f62fe525c65561bd79aea4592902671dc69d607b84739392eab776bf785c460e6
7
+ data.tar.gz: ebc6351f9ef09824dd11629be72734cc55f99092c6f4b7e90405ae5aeb062ede4eea0ea7376c1ef8b714bdd36d3f75061f3d046e808c1b9dff987dc992d8fa67
@@ -131,7 +131,7 @@ module ActiveFacts
131
131
 
132
132
  # Subset constraint using "A only if B" syntax
133
133
  rule a_only_if_b
134
- s clauses s only s if s r2:clauses s c:context_note? enforcement ';'
134
+ s clauses:query_clauses s only s if s r2:query_clauses s c:context_note? enforcement ';'
135
135
  end
136
136
 
137
137
  rule only_if
@@ -122,12 +122,14 @@ module ActiveFacts
122
122
  table.foreign_keys.map do |fk|
123
123
  association_name = fk.rails_from_association_name
124
124
 
125
- foreign_key = ""
126
125
  if association_name != fk.to.rails_singular_name
127
126
  # A different class_name is implied, emit an explicit one:
128
127
  class_name = ", :class_name => '#{fk.to.rails_class_name}'"
129
- from_column = fk.from_columns
130
- foreign_key = ", :foreign_key => :#{fk.from_columns[0].rails_name}"
128
+ end
129
+ foreign_key = ", :foreign_key => :#{fk.from_columns[0].rails_name}"
130
+ if foreign_key == fk.to.rails_singular_name+'_id'
131
+ # See lib/active_record/reflection.rb, method #derive_foreign_key
132
+ foreign_key = ''
131
133
  end
132
134
 
133
135
  %Q{
@@ -8,7 +8,7 @@ module ActiveFacts
8
8
  module Version
9
9
  MAJOR = 1
10
10
  MINOR = 2
11
- PATCH = 0
11
+ PATCH = 1
12
12
 
13
13
  STRING = [MAJOR, MINOR, PATCH].compact.join('.')
14
14
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: activefacts
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.0
4
+ version: 1.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Clifford Heath
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-06-09 00:00:00.000000000 Z
11
+ date: 2015-06-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activefacts-api