24 Feb '14, 4pm
Rails Quick Tips - ActiveRecord Ordering, from @mattpolito on the @hashrocket blog
See the difference? When the symbol is passed, the query is built using fully qualified and properly quoted column names. Most of the time your query will run fine but this does matter! The issue comes up when you start joining tables or merging queries. Without the column being fully qualified with the table name, your query may produce an ambiguous match. This occurs when your joined tables have columns with the same name.