1. 17 9月, 2020 4 次提交
    • E
      Merge pull request #40241 from eileencodes/make-role-required · ce77d671
      Eileen M. Uchitelle 提交于
      Make `role` required when using `shard` in `connected_to`
      ce77d671
    • E
      Make `role` required when using `shard` in `connected_to` · d4df616c
      eileencodes 提交于
      While working on some more indepth changes to Rails internal connection
      management we noticed that it's confusing in some cases that the `role`
      is implcit when using a `shard`. For example, if you passed a `shard`
      and not a `role` in an un-nested block the default `role` would be
      `writing`.
      
      ```
      ActiveRecord::Base.connected_to(shard: :one) do
        # connected to writing
      end
      ```
      
      However in cases where nesting is used it could be confusing to
      application authors that the role is inherited:
      
      ```
      ActiveRecord::Base.connected_to(role: :reading) do
        ActiveRecord::Base.connected_to(shard: :one) do
          # will read from shard one replica, not write to primary
        end
      end
      ```
      
      Since this could be potentially confusing, and extremely hard to track
      in complex applications, the best approach is to require `role` when
      using `shard` which is what this PR does.
      
      Note: the code for this method is...getting unweildy. Once the
      `database` argument is fully deprecated we can remove most of the guards
      and make `role` required by removing `nil` from the keyword argument.
      Until then we need to support required arguments in this round about way.
      d4df616c
    • A
      Merge pull request #40209 from latinadeveloper/guides-spanish-link · e5b07258
      Aaron Patterson 提交于
      Update translation efforts Spanish link.
      e5b07258
    • E
      Merge pull request #39989 from jonathanhefner/translate-refactor · 0b244ff4
      Eugene Kenny 提交于
      Improve Action View `translate` helper
      0b244ff4
  2. 16 9月, 2020 10 次提交
  3. 15 9月, 2020 2 次提交
  4. 14 9月, 2020 5 次提交
  5. 13 9月, 2020 3 次提交
  6. 12 9月, 2020 1 次提交
    • J
      Refactor Action View `translate` helper · 98a76a50
      Jonathan Hefner 提交于
      This refactor incidentally fixes a corner case when `translate` is
      called with a block, the translation is missing, and
      `debug_missing_translation` is false.
      
      This commit adds a test for the above corner case, and additional tests
      for existing behavior.
      98a76a50
  7. 11 9月, 2020 2 次提交
  8. 10 9月, 2020 7 次提交
  9. 09 9月, 2020 6 次提交