Why not just use `.to_query` on the hash here instead of all this?

See: http://apidock.com/rails/ActiveSupport/CoreExtensions/Hash/to_query