Created
September 23, 2020 06:30
-
-
Save jcrisp/42ad8778a7388c21c495d11788b0ab27 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Application < Rails::Application | |
# ... other config ... | |
# no error div on labels | |
add_error_div_proc = ActionView::Base.field_error_proc | |
config.action_view.field_error_proc = ->(html_tag, instance) { | |
html_tag && html_tag.start_with?("<label") ? html_tag : add_error_div_proc.call(html_tag, instance) } | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment