Skip to content

Commit

Permalink
Quote the column name to avoid issues with SQL reserved words
Browse files Browse the repository at this point in the history
  • Loading branch information
jrafanie authored and methodmissing committed Nov 3, 2009
1 parent da76a47 commit 598f353
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/scrooge.rb
Expand Up @@ -75,7 +75,7 @@ def callsite( signature )
# Link the column to its table
#
def attribute_with_table( attr_name )
"#{quoted_table_name}.#{attr_name.to_s}"
"#{quoted_table_name}.#{connection.quote_column_name(attr_name.to_s)}"
end

# Computes a unique signature from a given call stack and supplementary
Expand All @@ -95,4 +95,4 @@ def callsite_signature( call_stack, supplementary )
end

Scrooge::Optimizations::Columns::Macro.install!
Scrooge::Optimizations::Associations::Macro.install!
Scrooge::Optimizations::Associations::Macro.install!

0 comments on commit 598f353

Please sign in to comment.