composite_primary_keys 0.8.5 → 0.8.6

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,3 +1,8 @@
1
+ == 0.8.6 / 2007-6-12
2
+
3
+ * 1 emergency fix due to Rails Core change
4
+ * Rails v7004 removed #quote; fixed with connection.quote_column_name [thx nerdrew]
5
+
1
6
  == 0.8.5 / 2007-6-5
2
7
 
3
8
  * 1 change due to Rails Core change
@@ -273,7 +273,7 @@ module ActiveRecord::Associations
273
273
  when @reflection.options[:as]
274
274
  @finder_sql =
275
275
  "#{@reflection.klass.table_name}.#{@reflection.options[:as]}_id = #{@owner.quoted_id} AND " +
276
- "#{@reflection.klass.table_name}.#{@reflection.options[:as]}_type = #{@owner.class.quote @owner.class.base_class.name.to_s}"
276
+ "#{@reflection.klass.table_name}.#{@reflection.options[:as]}_type = #{@owner.class.connection.quote_column_name(@owner.class.base_class.name.to_s)}"
277
277
  @finder_sql << " AND (#{conditions})" if conditions
278
278
 
279
279
  else
@@ -300,7 +300,7 @@ module ActiveRecord::Associations
300
300
  when @reflection.options[:as]
301
301
  @finder_sql =
302
302
  "#{@reflection.klass.table_name}.#{@reflection.options[:as]}_id = #{@owner.quoted_id} AND " +
303
- "#{@reflection.klass.table_name}.#{@reflection.options[:as]}_type = #{@owner.class.quote @owner.class.base_class.name.to_s}"
303
+ "#{@reflection.klass.table_name}.#{@reflection.options[:as]}_type = #{@owner.class.connection.quote_column_name(@owner.class.base_class.name.to_s)}"
304
304
  else
305
305
  @finder_sql = full_columns_equals(@reflection.klass.table_name,
306
306
  @reflection.primary_key_name, @owner.quoted_id)
@@ -313,7 +313,7 @@ module ActiveRecord::Associations
313
313
  def construct_conditions
314
314
  conditions = if @reflection.through_reflection.options[:as]
315
315
  "#{@reflection.through_reflection.table_name}.#{@reflection.through_reflection.options[:as]}_id = #{@owner.quoted_id} " +
316
- "AND #{@reflection.through_reflection.table_name}.#{@reflection.through_reflection.options[:as]}_type = #{@owner.class.quote @owner.class.base_class.name.to_s}"
316
+ "AND #{@reflection.through_reflection.table_name}.#{@reflection.through_reflection.options[:as]}_type = #{@owner.class.connection.quote_column_name(@owner.class.base_class.name.to_s)}"
317
317
  else
318
318
  @finder_sql = full_columns_equals(@reflection.through_reflection.table_name,
319
319
  @reflection.through_reflection.primary_key_name, @owner.quoted_id)
@@ -334,7 +334,7 @@ module ActiveRecord::Associations
334
334
  if @reflection.source_reflection.options[:as]
335
335
  polymorphic_join = "AND %s.%s = %s" % [
336
336
  @reflection.table_name, "#{@reflection.source_reflection.options[:as]}_type",
337
- @owner.class.quote(@reflection.through_reflection.klass.name)
337
+ @owner.class.connection.quote_column_name(@reflection.through_reflection.klass.name)
338
338
  ]
339
339
  end
340
340
  end
@@ -2,7 +2,7 @@ module CompositePrimaryKeys
2
2
  module VERSION #:nodoc:
3
3
  MAJOR = 0
4
4
  MINOR = 8
5
- TINY = 5
5
+ TINY = 6
6
6
 
7
7
  STRING = [MAJOR, MINOR, TINY].join('.')
8
8
  end
@@ -33,7 +33,7 @@
33
33
  <h1>Composite Primary Keys</h1>
34
34
  <div id="version" class="clickable" onclick='document.location = "http://rubyforge.org/projects/compositekeys"; return false'>
35
35
  Get Version
36
- <a href="http://rubyforge.org/projects/compositekeys" class="numbers">0.8.5</a>
36
+ <a href="http://rubyforge.org/projects/compositekeys" class="numbers">0.8.6</a>
37
37
  </div>
38
38
  <h1>&#x2192; Ruby on Rails</h1>
39
39
 
@@ -1,3 +1,3 @@
1
1
  // Announcement JS file
2
- var version = "0.8.5";
2
+ var version = "0.8.6";
3
3
  MagicAnnouncement.show('compositekeys', version);
@@ -1,4 +1,4 @@
1
1
  // Version JS file
2
- var version = "0.8.5";
2
+ var version = "0.8.6";
3
3
 
4
4
  document.write(" - " + version);
metadata CHANGED
@@ -3,8 +3,8 @@ rubygems_version: 0.9.4.1
3
3
  specification_version: 1
4
4
  name: composite_primary_keys
5
5
  version: !ruby/object:Gem::Version
6
- version: 0.8.5
7
- date: 2007-06-05 00:00:00 +02:00
6
+ version: 0.8.6
7
+ date: 2007-06-12 00:00:00 +02:00
8
8
  summary: Composite key support for ActiveRecords
9
9
  require_paths:
10
10
  - lib