I'm trying to utilize a function, generate\_csv\_for\_x, that is already written. One of the parameters is a sort, which should be a hash, i.e. `{:on => "date", :direction => "desc"}`.

This code eventually calls `apply_sort`. Relevant code below.

```
on, direction = sort.values_at "on", "direction"

      if on == "date"
        order_on = "x.created_at"
        return x_scope.order(order_on => direction)
      end

      raise ArgumentError, "Not a valid sort.on value, you passed the following sort: #{sort}"
    end

```

The problem is that "on" and "direction" are not catching their symbol equivalent. Expected behavior. From Rails console I can get this to work just fine, since I just pass a hash with strings as keys.

However, when I call this method from elsewhere, and pass in a hash with strings as keys, they're being automatically converted into symbols. I even tried creating a default value, with strings as keys in this exact file, but they're being converted into symbols.

I can't change the current `on, direction = sort.values_at "on", "direction"` since it breaks a bunch of other stuff.