Changeset 5075
- Timestamp:
- 09/08/06 22:01:00 (3 years ago)
- Files:
-
- trunk/actionpack/lib/action_view/helpers/form_helper.rb (modified) (1 diff)
- trunk/activerecord/CHANGELOG (modified) (1 diff)
- trunk/activerecord/lib/active_record/associations.rb (modified) (1 diff)
- trunk/activerecord/lib/active_record/base.rb (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/actionpack/lib/action_view/helpers/form_helper.rb
r4613 r5075 413 413 self.field_helpers = (FormHelper.instance_methods - ['form_for']) 414 414 415 attr_accessor :object_name, :object 415 attr_accessor :object_name, :object, :options 416 416 417 417 def initialize(object_name, object, template, options, proc) trunk/activerecord/CHANGELOG
r5073 r5075 1 1 *SVN* 2 3 * Added parentheses around FROM clauses generated by Base and associations since MySQL 5 claim that to be the standard (and will screw up joins if its not there), see http://bugs.mysql.com/bug.php?id=13551 [DHH]4 2 5 3 * Rename AR::Base#quote so people can use that name in their models. #3628 [Koz] trunk/activerecord/lib/active_record/associations.rb
r5073 r5075 1132 1132 def construct_finder_sql_with_included_associations(options, join_dependency) 1133 1133 scope = scope(:find) 1134 sql = "SELECT #{column_aliases(join_dependency)} FROM (#{(scope && scope[:from]) || options[:from] || table_name})"1134 sql = "SELECT #{column_aliases(join_dependency)} FROM #{(scope && scope[:from]) || options[:from] || table_name} " 1135 1135 sql << join_dependency.join_associations.collect{|join| join.association_join }.join 1136 1136 trunk/activerecord/lib/active_record/base.rb
r5073 r5075 1090 1090 scope = scope(:find) 1091 1091 sql = "SELECT #{(scope && scope[:select]) || options[:select] || '*'} " 1092 sql << "FROM (#{(scope && scope[:from]) || options[:from] || table_name})"1092 sql << "FROM #{(scope && scope[:from]) || options[:from] || table_name} " 1093 1093 1094 1094 add_joins!(sql, options, scope)