This isn't valid syntax.  You're trying to treat a block as a hash.  You either need to wrap an extra set of `{` and `}` around the hash, or you need to use Rails 3 query syntax, i.e.: `order("#{quoted_table_name}.created_at DESC")`