After submitting contact form with some errors (e.g. empty email) the action create in controller ContactsController renders this route: http://localhost:3000/en/contacts and shows form errors. Witch is nice.
If you refresh the page now, you will get: Routing Error: No route matches [GET] "/en/contacts"
_Routes match in priority from top to bottom:
...
contacts_pathPOST (/:locale)/contacts(.:format)
contact_us/contacts#create {:locale=>/en|de/}
new_contact_path GET (/:locale)/contacts/new(.:format)
contact_us/contacts#new {:locale=>/en|de/}
contact_us_path GET (/:locale)/contact-us(.:format)
contactus/contacts#new {:locale=>/en|de/}
You have only [POST] _contactspath, but no any [GET] on this route.
This is the normal CRUD behavior in Rails controllers. If you want to allow the page to be reloaded you can add a route to the route file, but users should not have to.
After submitting contact form with some errors (e.g. empty email) the action create in controller ContactsController renders this route: http://localhost:3000/en/contacts and shows form errors. Witch is nice.
If you refresh the page now, you will get: Routing Error: No route matches [GET] "/en/contacts"
_Routes match in priority from top to bottom: ... contacts_path POST (/:locale)/contacts(.:format)
contact_us/contacts#create {:locale=>/en|de/}
new_contact_path GET (/:locale)/contacts/new(.:format)
contact_us/contacts#new {:locale=>/en|de/}
contact_us_path GET (/:locale)/contact-us(.:format) contactus/contacts#new {:locale=>/en|de/}
You have only [POST] _contactspath, but no any [GET] on this route.