composite_primary_keys 0.8.5 → 0.8.6
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.
- data/History.txt +5 -0
- data/lib/composite_primary_keys/associations.rb +4 -4
- data/lib/composite_primary_keys/version.rb +1 -1
- data/website/index.html +1 -1
- data/website/version-raw.js +1 -1
- data/website/version.js +1 -1
- metadata +2 -2
data/History.txt
CHANGED
@@ -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.
|
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.
|
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.
|
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.
|
337
|
+
@owner.class.connection.quote_column_name(@reflection.through_reflection.klass.name)
|
338
338
|
]
|
339
339
|
end
|
340
340
|
end
|
data/website/index.html
CHANGED
@@ -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.
|
36
|
+
<a href="http://rubyforge.org/projects/compositekeys" class="numbers">0.8.6</a>
|
37
37
|
</div>
|
38
38
|
<h1>→ Ruby on Rails</h1>
|
39
39
|
|
data/website/version-raw.js
CHANGED
data/website/version.js
CHANGED
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.
|
7
|
-
date: 2007-06-
|
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
|