mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
8a0bc4aa90
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. |
||
---|---|---|
.. | ||
action_view | ||
action_view.rb |