Thomas McDonnell

Joined

370 Experience
3 Lessons Completed
0 Questions Solved

Activity

Posted in Hotwire missing template on form submission

Three days on this, digging into source code of turbo-rails and seeing how it works only to find it was a simple syntax error LOL The error messages could be better I think, but then again I could have just put my glasses on earlier to :)

Posted in Hotwire missing template on form submission

Hi Chris/extended go-rails community :)

I have been playing around with the new turbo rails and trying to implement a turbo stream for my login form submission errors. I am wondering if anyone else has come across this issue, my form submission takes place as it should and on turbo format response it looks as though it is working correctly and rendering the form template with errors, however, I am getting a 500 missing template error ActionView::MissingTemplate (Missing template <turbo-stream action="replace" target="new_user_session"><template><form id="new_user_session" class="grid grid-cols-6 gap-2" data-controller="accounts--form" action="/accounts/sessions" accept-charset="UTF-8" data-remote="true" method="post"><input type="hidden" name="authenticity_token" value="fJcDVQYgDyfW53OdG5D7wptzyLMu6qS/CGgBhoTunJKNb8Ri9QBAHxY3eCuYhi6f29wYaqwzP/j1A6W8FtzLMw==" />
<div class="col-span-6 field">
<div class="field_with_errors"><label class="block text-md font-medium text-gray-700" for="user_session_email">Email</label></div>
<div class="field_with_errors"><input class="mt-1 bg-gray-100 focus:outline-none focus:ring focus:border-purple-300 focus:bg-white border border-gray-200 block w-full sm:text-sm rounded-lg py-3 px-4 mb-3" required="required" type="email" value="test@t.com" name="user_session[email]" id="user_session_email" /></div>
</div> .....
which is confusing me as I can't think of what template it is looking for as the error correctly renders the form with errors so it's not the form partial.

Running Rails 6.0.3.4 and Ruby 2.7.0

Posted in Contributing To Thor Discussion

Awesome stuff!