Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions lib/bh/core_ext/rails/form/base_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ def label_and_field_container(label_and_field, field_type, errors = {})
def show_error_icon?(field_type, errors, suffix = nil)
no_icon = %w(checkbox number_field radio_button select legend)
hide = no_icon.include?(field_type.to_s)
errors.any? && @options.fetch(:errors, {}).fetch(:icons, true) && !hide && suffix.nil?
errors.any? && (@options.fetch(:errors, {}) || {}).fetch(:icons, true) && !hide && suffix.nil?
end

def error_icon_tag
Expand Down Expand Up @@ -131,7 +131,7 @@ def label_and_field(container_class, method, options = {}, &block)
end

def show_error_help?
@options.fetch(:errors, {}).fetch(:messages, :inline).to_s == 'inline'
(@options.fetch(:errors, {}) || {}).fetch(:messages, :inline).to_s == 'inline'
end

def inline_form?
Expand Down