This commit updates the comments in ActionView::Helpers::FormHelper, replacing instances of `form_for` with `form_with` as the recommended approach. The Rails guide has already documented the usage of `form_with` on the form_helpers page.
Ref: https://guides.rubyonrails.org/form_helpers.html
Co-authored-by: Hartley McGuire <skipkayhil@gmail.com>
This is too much complexity for something low value. Let's just always
warn when a test doesn't have any assertions.
If people want to raise an error or ignore them, they can do so by
overriding `Warning.warn`.
When — is used in a subtitle, the anchor links use -%E2%80%94-
instead of —. This prevents the browser jumping to the anchor link.
Replacing — with : fixes the problem.
Co-authored-by: James Bunch <fallwith@gmail.com>
In https://github.com/ruby/debug/issues/797, we found that requiring
`debug` automatically activates it, which could introduce runtime overhead
and cause memory bloat. And I think many users aren't aware of this and
could be taxed by this unnecessarily (e.g. having longer builds on CI).
Therefore, I propose to add `require: "debug/prelude"` after `debug`'s
Gemfile entry in the default Gemfile template. This way, users can
still use breakpoint methods like `debugger`, `binding.break`, and `binding.b`,
but the debugger won't be activated until a breakpoint is hit.
at the connection level
Fix#51448
Type cast columns of type `date` to ruby `Date` when running a raw
query through `ActiveRecord::Base.connection.select_all`.
Add periods to comments in development.rb.tt and test.rb.tt for consistency.
[ci skip]
Co-authored-by: Carlos Antonio da Silva <carlosantoniodasilva@gmail.com>
rails/rails@76966f9 implemented configuration to report assertionless tests. But the configuration causes ActiveSupport::TestCase to be loaded too early in the boot process. It causes issues when other engines define load hooks on :active_support_test_case because they are run immediately. Instead, we should wrap the configuration in a load hook so it gets set at the appropriate time.
rails/rails@957a3e5 allowed the BACKTRACE env to unsilence backtraces in normals runs not just tests. However, the implementation achieves this by removing the silences in an initializer. This means that the state of backtrace silencer becomes cached by spring and the developer needs to reset spring every time they want to silence or unsilence the backtrace. It also means custom silencers added in an initializer need to be added after the :configure_backtrace_cleaner initializer or else they won't be un-silenced properly.
Instead, let's teach Rails::BacktraceCleaner to unsilence the backtrace if the BACKTRACE variable is set. ActiveSupport::BacktraceCleaner#clean already allows this by passing nil as the second argument, which just filters but does not silence the backtrace. So, in Rails::BacktraceCleaner#clean we can call super with nil in the second argument if the BACKTRACE variable is present. That way we do not need to remove the silencers in an initializer, and we don't have to reset spring to silence the backtrace.