1. 22 9月, 2020 5 次提交
    • E
      Fix missing backticks in errors · 315f8b46
      eileencodes 提交于
      These weren't consistent. In some errors we were using backticks and
      others we weren't. This fixes `connected_to` errors to use backticks
      around the method name
      315f8b46
    • E
      Fix missing backticks in errors · 36b76556
      eileencodes 提交于
      These weren't consistent. In some errors we were using backticks and
      others we weren't. This fixes `connects_to` errors to use backticks
      around the method name
      36b76556
    • E
      Merge pull request #39027 from jmks/skip_test_database_with_environment_variable · 0bce8134
      Eileen M. Uchitelle 提交于
      Database tasks can SKIP_TEST_DATABASE with environment variable
      0bce8134
    • E
      Improve while_preventing_writes documentation · 82217c21
      eileencodes 提交于
      Adds a note to clarify that `while_preventing_writes` is not meant to be
      a replacement for a readonly replica user.
      
      Closes #39132 and #39133
      Co-authored-by: NEike Send <eike.send@gmail.com>
      82217c21
    • A
      Catch invalid UTF-8 encodings on ActionDispatch::Http::Request#POST (#40124) · 7dc53ec9
      Adrianna Chang 提交于
      * Add binary encoding logic into ActionDispatch::Request::Utils
      
      Moving the logic to set binary encoding into ActionDispatch::Request::Utils
      will allow us to encode from GET and POST in ActionDispatch::Request.
      
      * Refactor binary encoding logic
      
      - Move binary encoding calls into GET, POST and path_parameters
      - Remove binary encoding from ActionDispatch::Http::Request
      - This way, we only raise an invalid encoding exception if the controller is not requesting
      parameters in binary encoding
      
      * Check if encoding is valid in ActionDispatch::Request#POST and raise BadRequest if invalid
      
      * Fix multipart_params_test that has binary-encoded params containing invalid UTF-8 characters
      
      * Address PR comments
      
      * Pass action and controller to Request::Utils.set_binary_encoding
      
      [Rafael Mendonça França + Adrianna Chang]
      7dc53ec9
  2. 21 9月, 2020 8 次提交
  3. 20 9月, 2020 2 次提交
  4. 19 9月, 2020 2 次提交
  5. 18 9月, 2020 2 次提交
  6. 17 9月, 2020 6 次提交
    • V
      Generate a preview without print margins · 3803671a
      Vincent Robert 提交于
      When a PDF is used for both printing and displaying. It will most likely
      contain a crop box in order to hide print margins when displaying the PDF.
      
      Use Poppler's parameter to automatically use the crop box (visible box)
      rather than the media box (printable box) in order to remove those margins
      when drawing the PDF.
      
      See https://manpages.debian.org/testing/poppler-utils/pdftoppm.1.en.html
      3803671a
    • E
      Fix documentation for connected_to · 59ef3c8e
      eileencodes 提交于
      In #40241 I forgot to fix the method's documentation. This commit fixes
      the docs to match the new, unreleased behavior.
      59ef3c8e
    • 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
  7. 16 9月, 2020 10 次提交
  8. 15 9月, 2020 4 次提交
  9. 14 9月, 2020 1 次提交
    • E
      Merge pull request #40219 from... · 31197f20
      Eileen M. Uchitelle 提交于
      Merge pull request #40219 from eileencodes/ensure-connects_to-is-always-called-on-base-or-abstract-classes
      
      Ensure `connects_to` can only be called on base or abstract classes
      31197f20