Skip to content

Commit

Permalink
fixed rail 3.0.4 bug, see select_all() method: regex
Browse files Browse the repository at this point in the history
  • Loading branch information
raygao committed Feb 20, 2011
1 parent 61c80e2 commit ab96dc4
Showing 1 changed file with 1 addition and 1 deletion.
Expand Up @@ -321,7 +321,7 @@ def select_all(sql, name = nil) #:nodoc:
sql = fix_single_quote_in_where(sql)
# Arel adds the class to the selection - we do not want this i.e...
# SELECT contacts.* FROM => SELECT * FROM
sql = sql.gsub(/SELECT\s+[^\(][A-Z]+\./mi," ")
sql = sql.gsub(/SELECT\s+[^\(][A-Z]+\./mi,"SELECT ")


raw_table_name = sql.match(/FROM (\w+)/mi)[1]
Expand Down

0 comments on commit ab96dc4

Please sign in to comment.