I'd probably replace these two lines with a `case`, since it'd be cleaner:

``` ruby
query = case query
when String, Hash
  where(query)
when Array
  where(*query)
end
```

Even if it's a bit longer in lines.