Closed ericraio closed 5 years ago
Hi Eric,
Thanks for giving loaf
a try.
Having looked at your example, one thing that I'm rather confused about is that you expect to have a breadcrumb on create
action that gets triggered by POST
request? I mean, there is no page that corresponds with create
action. I would try actually defining breadcrumb in the new
action itself.
Hi Eric,
Thanks for giving
loaf
a try.Having looked at your example, one thing that I'm rather confused about is that you expect to have a breadcrumb on
create
action that gets triggered byPOST
request? I mean, there is no page that corresponds withcreate
action. I would try actually defining breadcrumb in thenew
action itself.
Hey @piotrmurach Thank you for responding.
My issue is that if the parameters are invalid on the Create action, I then render the new action instead of redirect. Just like standard rails scaffold
By rendering the new action during the create action as you can see with the example above, the Breadcrumb is never set which is why I call breadcrumb.
Any suggestions on how to fix this?
Eric, your issue as reported is not very clear to me. The 'properly' is rather vague word and doesn't specify what you expect to happen vs what actually happens. The code sample doesn't answer these questions. Ideally, if you could either create an example of a Rails app that replicates the issue or even better submit a failing test. The integration tests use a dummy Rails app to confirm behaviour. You could, for example, add new products controller that demonstrates the problem. Here is an example of posts controller that handles the create action.
I have a very simple action here and when a product is invalid and I render the new action, the url does not match properly