composite_primary_keys 3.0.8 → 3.0.9

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.
@@ -1,3 +1,7 @@
1
+ == 3.0.9 2010-12-04
2
+ * Fix up support for composite key fixtures.
3
+
4
+
1
5
  == 3.0.8 2010-12-04
2
6
  * Fix for translation issue in unique validation. Thanks to Daniel Berger for the patch.
3
7
  * Fix to support child classes of composite primary key models
@@ -46,8 +46,8 @@ require 'active_record/associations/has_one_through_association'
46
46
  require 'active_record/associations/through_association_scope'
47
47
  require 'active_record/relation/query_methods'
48
48
  require 'active_record/attribute_methods/primary_key'
49
+ require 'active_record/fixtures'
49
50
 
50
- require 'composite_primary_keys/fixtures'
51
51
  require 'composite_primary_keys/composite_arrays'
52
52
  require 'composite_primary_keys/associations'
53
53
  require 'composite_primary_keys/associations/association_proxy'
@@ -65,6 +65,7 @@ require 'composite_primary_keys/calculations'
65
65
  require 'composite_primary_keys/validations/uniqueness'
66
66
  require 'composite_primary_keys/query_methods'
67
67
  require 'composite_primary_keys/primary_key'
68
+ require 'composite_primary_keys/fixtures'
68
69
 
69
70
  Dir[File.dirname(__FILE__) + '/composite_primary_keys/connection_adapters/*.rb'].each do |adapter|
70
71
  begin
@@ -1,8 +1,9 @@
1
- class Fixture #:nodoc:
1
+ class Fixture
2
2
  def [](key)
3
3
  if key.is_a? Array
4
- return key.map { |a_key| self[a_key.to_s] }.to_composite_ids
4
+ key.map { |a_key| self[a_key.to_s] }.to_composite_ids
5
+ else
6
+ @fixture[key]
5
7
  end
6
- @fixture[key]
7
8
  end
8
9
  end
@@ -2,7 +2,7 @@ module CompositePrimaryKeys
2
2
  module VERSION #:nodoc:
3
3
  MAJOR = 3
4
4
  MINOR = 0
5
- TINY = 8
5
+ TINY = 9
6
6
  STRING = [MAJOR, MINOR, TINY].join('.')
7
7
  end
8
8
  end
@@ -572,4 +572,18 @@ PGError: ERROR: operator does not exist: character varying = integer
572
572
  LINE 1: ...ments".person_type = 'User') AND ("comments".person_id = 1))
573
573
  ^
574
574
  HINT: No operator matches the given name and argument type(s). You might need to add explicit type casts.
575
+ : SELECT "hacks".* FROM "hacks" INNER JOIN "comments" ON ("hacks"."name" = "comments"."hack_id") WHERE (("comments".person_type = 'User') AND ("comments".person_id = 1))
576
+ SQL (1.0ms) SHOW client_min_messages
577
+ SQL (0.0ms) SET client_min_messages TO 'panic'
578
+ SQL (0.0ms) SET standard_conforming_strings = on
579
+ SQL (0.0ms) SET client_min_messages TO 'notice'
580
+ SQL (0.0ms) SHOW TIME ZONE
581
+ PGError: ERROR: column "tariff_idstart_date" does not exist
582
+ LINE 1: SELECT COUNT(DISTINCT tariff_idstart_date) FROM "tariffs" LE...
583
+ ^
584
+ : SELECT COUNT(DISTINCT tariff_idstart_date) FROM "tariffs" LEFT OUTER JOIN "product_tariffs" ON "product_tariffs"."tariff_id" = "tariffs"."tariff_id" AND "product_tariffs"."tariff_start_date" = "tariffs"."start_date"
585
+ PGError: ERROR: operator does not exist: character varying = integer
586
+ LINE 1: ...ments".person_type = 'User') AND ("comments".person_id = 1))
587
+ ^
588
+ HINT: No operator matches the given name and argument type(s). You might need to add explicit type casts.
575
589
  : SELECT "hacks".* FROM "hacks" INNER JOIN "comments" ON ("hacks"."name" = "comments"."hack_id") WHERE (("comments".person_type = 'User') AND ("comments".person_id = 1))
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: composite_primary_keys
3
3
  version: !ruby/object:Gem::Version
4
- hash: 23
4
+ hash: 21
5
5
  prerelease: false
6
6
  segments:
7
7
  - 3
8
8
  - 0
9
- - 8
10
- version: 3.0.8
9
+ - 9
10
+ version: 3.0.9
11
11
  platform: ruby
12
12
  authors:
13
13
  - Dr Nic Williams