rails--rails/actionview/lib/action_view
Sean Doyle 8a0bc4aa90 Support calls to `#field_name` with nil `object_name`
It's possible for `ActionView::Helpers::FormTagHelper#field_name` calls
made by instances constructed through `fields` and `fields_for` helpers
to have an `object_name` argument that's `nil`. For example, the
following will raise an `undefined method `empty?' for nil:NilClass`
exception:

```erb
<%= fields do |f| %>
  <%= f.field_name :body %>
<% end %>
```

To guard against those calls, replace the method's call to
`String#empty?` with `Object#blank?`, since `NilClass#empty?` is not
defined.
2022-06-15 18:51:20 +01:00
..
dependency_tracker Replace dependency tracker with ripper based tracker 2021-07-12 10:33:09 -07:00
helpers Support calls to `#field_name` with nil `object_name` 2022-06-15 18:51:20 +01:00
locale
renderer Mark up inline code [ci-skip] 2022-02-21 11:11:11 -06:00
tasks
template Allow all available locales for template lookups. 2022-05-30 09:45:28 +02:00
testing Standardize nodoc comments 2021-07-29 21:18:07 +00:00
base.rb Remove deprecated `Rails.config.action_view.raise_on_missing_translations` 2021-11-17 21:51:16 +00:00
buffers.rb Standardize nodoc comments 2021-07-29 21:18:07 +00:00
cache_expiry.rb Call Executor#wrap around each test 2021-10-28 15:18:29 +02:00
context.rb
dependency_tracker.rb Default to ERB Tracker 2021-08-04 15:34:07 -07:00
digestor.rb Use TemplatePath in Digestor 2021-05-10 22:26:14 -07:00
flows.rb Standardize nodoc comments 2021-07-29 21:18:07 +00:00
gem_version.rb Fix #version docs and some typos 2022-03-16 01:48:37 +05:30
helpers.rb Standardize nodoc comments 2021-07-29 21:18:07 +00:00
layouts.rb Mark up inline code [ci-skip] 2022-02-21 11:11:11 -06:00
log_subscriber.rb Split actionview log subscriber Start events 2022-02-17 08:20:01 -08:00
lookup_context.rb remove rendered_format from LookupContext 2022-05-26 18:04:24 +10:00
model_naming.rb Fix typo in the documentation 2021-11-15 23:24:00 +00:00
path_set.rb Standardize nodoc comments 2021-07-29 21:18:07 +00:00
railtie.rb Define config.enable_reloading to be !config.cache_classes 2022-04-14 18:11:36 +02:00
record_identifier.rb Replace "overwrite" with "override" [ci-skip] 2022-02-21 11:11:11 -06:00
render_parser.rb Replace dependency tracker with ripper based tracker 2021-07-12 10:33:09 -07:00
rendering.rb All intermediate delegation methods should preserve kwargs flag 2022-04-06 15:32:54 +09:00
ripper_ast_parser.rb Enable `Style/MapToHash` cop 2022-02-26 04:31:03 +09:00
routing_url_for.rb Document that url_for can take classes 2022-05-13 10:09:17 +09:00
template.rb Action View: allow to compile ERB templates with `# frozen_string_literal: true` 2021-11-29 10:38:51 +01:00
template_details.rb Store requested detail indexes in hashes 2021-07-13 12:26:26 -07:00
template_path.rb Improve docs for TemplatePath 2021-05-10 22:26:14 -07:00
test_case.rb Fix empty request inside helpers test 2022-02-09 08:47:27 +01:00
unbound_template.rb Normalize locals in unbound templates 2021-08-09 12:56:57 -07:00
version.rb Fix #version docs and some typos 2022-03-16 01:48:37 +05:30
view_paths.rb Cross-link API docs [ci-skip] 2022-02-21 11:45:25 -06:00