diff options
Diffstat (limited to 'activerecord')
-rw-r--r-- | activerecord/CHANGELOG | 2 | ||||
-rw-r--r-- | activerecord/lib/active_record/connection_adapters/sqlserver_adapter.rb | 2 |
2 files changed, 3 insertions, 1 deletions
diff --git a/activerecord/CHANGELOG b/activerecord/CHANGELOG index d3d0b3d510..d770a340e7 100644 --- a/activerecord/CHANGELOG +++ b/activerecord/CHANGELOG @@ -1,5 +1,7 @@ *SVN* +* SQLServer: quote table name in indexes query. #2928 [keithm@infused.org] + * Subclasses of an abstract class work with single-table inheritance. #5704, #7284 [BertG, nick+rails@ag.arizona.edu] * Make sure sqlite3 driver closes open connections on disconnect [Rob Rasmussen] diff --git a/activerecord/lib/active_record/connection_adapters/sqlserver_adapter.rb b/activerecord/lib/active_record/connection_adapters/sqlserver_adapter.rb index 28936f8a89..92ac249fdf 100644 --- a/activerecord/lib/active_record/connection_adapters/sqlserver_adapter.rb +++ b/activerecord/lib/active_record/connection_adapters/sqlserver_adapter.rb @@ -430,7 +430,7 @@ module ActiveRecord def indexes(table_name, name = nil) ActiveRecord::Base.connection.instance_variable_get("@connection")["AutoCommit"] = false indexes = [] - execute("EXEC sp_helpindex #{table_name}", name) do |sth| + execute("EXEC sp_helpindex '#{table_name}'", name) do |sth| sth.each do |index| unique = index[1] =~ /unique/ primary = index[1] =~ /primary key/ |