This file contains hidden or 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
| <%= form_with(model: post) do |form| %> | |
| <% error_handler = ::InlineErrorHandler.new(post, self) %> # Initialize the error handler presenter here, or consider doing this in the controller | |
| <div> | |
| <%= form.label :title, style: "display: block" %> | |
| <%= form.text_field :title %> | |
| <%= error_handler.error_message_for(:title) %> # Display inline error for the title field here | |
| </div> | |
| <div> | |
| <%= form.label :body, style: "display: block" %> |
OlderNewer