1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00
rails--rails/actionview/test/template
Sean Doyle 9dc083f95d form_for: Attempt to call to_model on record
Related to https://github.com/rails/rails/issues/44326

---

The changes introduced in [rails/rails#43421][] did not account for
attempting to coerce the record with [#to_model][]. This commit resolves
that issue and adds test coverage to guard against future regressions.

Additionally, this adds tests to exercise `form_with` to ensure that it
_does not_ call `#to_model` on its `model:` argument, since that was the
behavior in [6.1.4.4][]

[rails/rails#43421]: https://github.com/rails/rails/pull/43421
[#to_model]: https://edgeapi.rubyonrails.org/classes/ActiveModel/Conversion.html#method-i-to_model
[6.1.4.4]: https://github.com/rails/rails/issues/44326#issuecomment-1029344241
2022-02-17 16:01:57 -05:00
..
erb Allow Erubi bufvar to be configured 2020-05-21 15:22:51 -05:00
form_helper form_for: Attempt to call to_model on record 2022-02-17 16:01:57 -05:00
testing Fix spelling in FixtureResolverTest 2021-04-13 10:46:09 -04:00
active_model_helper_test.rb Remove deprecated support concat errors to ActiveModel::Errors#messages 2021-11-17 21:51:25 +00:00
asset_tag_helper_test.rb Ensure preload_link_tag preloads modules correctly 2022-01-18 18:00:04 -03:00
atom_feed_helper_test.rb feat(rubocop): Add Style/RedundantRegexpEscape 2020-12-08 18:57:09 +00:00
capture_helper_test.rb Restore implicit to_s for content_for and provide 2021-05-07 12:14:39 -04:00
compiled_templates_test.rb Remove FallbackFileSystemResolver 2021-04-06 14:20:48 -07:00
controller_helper_test.rb
csp_helper_test.rb
csrf_helper_test.rb
date_helper_i18n_test.rb
date_helper_test.rb Add :day_format option to date_select 2021-10-28 13:51:20 +09:00
dependency_tracker_test.rb Replaces the "hash rocket" operator in favor of the newer Ruby syntax when rendering on render 2021-10-03 23:33:56 -03:00
digestor_test.rb Replace map + compact with filter_map 2021-04-22 22:08:34 -03:00
erb_util_test.rb
file_system_resolver_test.rb
form_collections_helper_test.rb Add autocomplete="off" to all generated hidden fields (fixes #42610) 2021-09-21 15:57:56 -04:00
form_helper_test.rb form_for: Attempt to call to_model on record 2022-02-17 16:01:57 -05:00
form_options_helper_i18n_test.rb
form_options_helper_test.rb Remove deprecated support concat errors to ActiveModel::Errors#messages 2021-11-17 21:51:25 +00:00
form_tag_helper_test.rb Merge PR #43409 2021-11-15 21:20:34 +00:00
html_test.rb
javascript_helper_test.rb Add spell checking with codespell as a GitHub Action 2021-05-04 14:46:21 +10:00
log_subscriber_test.rb Make the arguments of ActionView::Base#initialize required 2020-10-30 00:25:24 +00:00
lookup_context_test.rb Avoid splats in LookupContext and PathSet 2021-07-13 17:49:15 -07:00
number_helper_test.rb Fix rubocop issue of single- vs double- quotes (+1 squashed commit) 2021-12-13 16:48:53 +00:00
output_safety_helper_test.rb chore: fix grammar and spelling 2021-04-15 16:57:01 +10:00
partial_iteration_test.rb fix require 2020-02-27 14:12:09 -08:00
record_identifier_test.rb
render_test.rb Action View: allow to compile ERB templates with # frozen_string_literal: true 2021-11-29 10:38:51 +01:00
resolver_shared_tests.rb Add support to locales with lowdash in Resolver::PathParser 2022-01-14 15:11:58 -03:00
sanitize_helper_test.rb chore: fix grammar and spelling 2021-04-15 16:57:01 +10:00
streaming_render_test.rb Remove deprecated support to passing relative paths to render file: 2020-10-30 00:25:14 +00:00
tag_helper_test.rb Fix test_tag_attributes_escapes_values assertion 2022-01-29 12:10:14 -06:00
template_error_test.rb
template_path_test.rb Add missing slash to test_parse_root_partial_with_slash 2021-05-12 06:24:08 +09:00
template_test.rb Revert "Remove redundant @virtual_path variable" 2020-12-30 14:07:09 +01:00
test_case_test.rb Fix empty request inside helpers test 2022-02-09 08:47:27 +01:00
test_test.rb Replace ableist language 2021-10-05 22:27:09 -04:00
text_helper_test.rb Replace ableist language 2021-10-05 22:27:09 -04:00
text_test.rb
translation_helper_test.rb Remove deprecated Rails.config.action_view.raise_on_missing_translations 2021-11-17 21:51:16 +00:00
url_helper_test.rb Merge PR #43157 2021-12-20 23:01:53 +00:00