I have errors on the model as opposed to the model fields, so these are added to errors[:base]. In my simple form code I am using;
<%= f.error_notification %>
This shows ordinary errors, but not the base errors. How do I view the base erros?
error_notification
accepts a message
option should you wish to override it using any base error messages.
<%= f.error_notification message: f.object.errors[:base].to_sentence %>
Just add
<%= f.error :base %>
which will show the base errors at the top of the form.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With