Skip to content

Commit

Permalink
Quitoting the table name before querying.
Browse files Browse the repository at this point in the history
  • Loading branch information
tenderlove committed Dec 5, 2011
1 parent 988061d commit 8aa7b86
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ def table_alias_for(table_name)
# table_exists?(:developers)
def table_exists?(table_name)
begin
select_value("SELECT 1 FROM #{table_name.to_s} where 1=0")
select_value("SELECT 1 FROM #{quote_table_name(table_name)} where 1=0")
true
rescue
false
Expand Down

0 comments on commit 8aa7b86

Please sign in to comment.