aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--actionpack/lib/action_view/helpers/form_helper.rb2
-rw-r--r--activerecord/CHANGELOG2
-rwxr-xr-xactiverecord/lib/active_record/associations.rb2
-rwxr-xr-xactiverecord/lib/active_record/base.rb2
4 files changed, 3 insertions, 5 deletions
diff --git a/actionpack/lib/action_view/helpers/form_helper.rb b/actionpack/lib/action_view/helpers/form_helper.rb
index 43185e3a0c..f9baed69a9 100644
--- a/actionpack/lib/action_view/helpers/form_helper.rb
+++ b/actionpack/lib/action_view/helpers/form_helper.rb
@@ -412,7 +412,7 @@ module ActionView
class_inheritable_accessor :field_helpers
self.field_helpers = (FormHelper.instance_methods - ['form_for'])
- attr_accessor :object_name, :object
+ attr_accessor :object_name, :object, :options
def initialize(object_name, object, template, options, proc)
@object_name, @object, @template, @options, @proc = object_name, object, template, options, proc
diff --git a/activerecord/CHANGELOG b/activerecord/CHANGELOG
index 4c672c02a9..9c5f3adb55 100644
--- a/activerecord/CHANGELOG
+++ b/activerecord/CHANGELOG
@@ -1,7 +1,5 @@
*SVN*
-* 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]
-
* Rename AR::Base#quote so people can use that name in their models. #3628 [Koz]
* Add deprecation warning for inferred foreign key. #6029 [Josh Susser]
diff --git a/activerecord/lib/active_record/associations.rb b/activerecord/lib/active_record/associations.rb
index 6168c8a723..e2dca89d49 100755
--- a/activerecord/lib/active_record/associations.rb
+++ b/activerecord/lib/active_record/associations.rb
@@ -1131,7 +1131,7 @@ module ActiveRecord
def construct_finder_sql_with_included_associations(options, join_dependency)
scope = scope(:find)
- sql = "SELECT #{column_aliases(join_dependency)} FROM (#{(scope && scope[:from]) || options[:from] || table_name}) "
+ sql = "SELECT #{column_aliases(join_dependency)} FROM #{(scope && scope[:from]) || options[:from] || table_name} "
sql << join_dependency.join_associations.collect{|join| join.association_join }.join
add_joins!(sql, options, scope)
diff --git a/activerecord/lib/active_record/base.rb b/activerecord/lib/active_record/base.rb
index 756d63dfdb..e9c9212560 100755
--- a/activerecord/lib/active_record/base.rb
+++ b/activerecord/lib/active_record/base.rb
@@ -1089,7 +1089,7 @@ module ActiveRecord #:nodoc:
def construct_finder_sql(options)
scope = scope(:find)
sql = "SELECT #{(scope && scope[:select]) || options[:select] || '*'} "
- sql << "FROM (#{(scope && scope[:from]) || options[:from] || table_name}) "
+ sql << "FROM #{(scope && scope[:from]) || options[:from] || table_name} "
add_joins!(sql, options, scope)
add_conditions!(sql, options[:conditions], scope)