app/helpers/active_admin/display_helper.rb in activeadmin-4.0.0.beta13 vs app/helpers/active_admin/display_helper.rb in activeadmin-4.0.0.beta14
- old
+ new
@@ -22,10 +22,10 @@
# Attempts to call any known display name methods on the resource.
# See the setting in `application.rb` for the list of methods and their priority.
def display_name(resource)
unless resource.nil?
result = render_in_context(resource, display_name_method_for(resource))
- if result.to_s&.strip&.present?
+ if result.to_s.strip.present?
ERB::Util.html_escape(result)
else
ERB::Util.html_escape(render_in_context(resource, DISPLAY_NAME_FALLBACK))
end
end