1. 22 2月, 2019 2 次提交
  2. 21 2月, 2019 6 次提交
  3. 20 2月, 2019 5 次提交
  4. 19 2月, 2019 2 次提交
  5. 18 2月, 2019 4 次提交
  6. 17 2月, 2019 3 次提交
  7. 16 2月, 2019 5 次提交
  8. 15 2月, 2019 4 次提交
  9. 14 2月, 2019 2 次提交
    • E
      Improve errors and handling of hashes for database configurations · 06f94343
      eileencodes 提交于
      In chat Sam Saffron asked how to use the setter now that configurations
      is no longer a hash and you need to do AR::Base.configurations["test"]=.
      
      Technically you can do `ActiveRecord::Base.configurations = { the hash
      }` but I realized the old way throws an error and is unintuitive.
      
      To aid in the transition from hashes to objects this PR makes a few
      changes:
      
      1) Re-adds a deprecated hash setter `[]=` that will add a new hash
      to the configurations list OR replace an existing hash if that
      environment is already present. This won't be supported in future Rails
      versions but a good error is important.
      
      2) Changed to throw deprecation warnings on the methods we decided to support
      for hash conversion and raise on the methods we don't support.
      
      3) Refactored the setter/getter hash deprecation warnings messages and
      rewrote them.
      
      Getters message:
      
      ```
      DEPRECATION WARNING: `ActiveRecord::Base.configurations` no longer
      returns a hash. Methods that act on the hash like `values` are
      deprecated and will be removed in Rails 6.1. Use the `configs_for`
      method to collect and iterate over the database configurations.
      ```
      
      Setter message:
      
      ```
      DEPRECATION WARNING: Setting `ActiveRecord::Base.configurations` with
      `[]=` is deprecated. Use `ActiveRecord::Base.configurations=` directly
      to set the configurations instead.
      ```
      
      4) Rewrote the legacy configurations test file to test all the public
      methods in the DatabaseConfigurations class.
      06f94343
    • R
      Revert "Chaining named scope is no longer leaking to class level querying methods" · 4f2a6356
      Ryuta Kamizono 提交于
      This reverts #32380, since this may cause that silently leaking
      information when people upgrade the app.
      
      We need deprecation first before making this.
      4f2a6356
  10. 13 2月, 2019 6 次提交
  11. 12 2月, 2019 1 次提交