• Igor Drozdov's avatar
    Fix passing dynamic kwargs to where scope · 4808039c
    Igor Drozdov authored
    When a hash passed along with kwargs, only the first statement
    wins in Rails 6.1:
    
    ```ruby
    Group.where({ created_at: 30.days.ago..2.days.ago }, id: 1)
    ```
    
    Takes only the first argument into account.
    
    In Rails 6.1 it should be passed as:
    
    ```ruby
    Group.where(created_at: 30.days.ago..2.days.ago, id: 1)
    ```
    
    That's why we need a splat operator here.
    4808039c
usage_data.rb 48.1 KB