I want to have a page on which I create a new account ( views / accounts / new.html.erb ), but when I link to this page, I get an error that the parent object (like kid) id is missing.
<%= link_to (t 'add_account'), new_kid_account_path, :class => 'btn btn-primary' %>
Error message:
There are no route mappings {: action => "new" ,: controller => "accounts"} missing required keys: [: kid_id]
In my active record - the account belongs to the kids, and the baby has a lot of accounts.
I donβt want to pass the kid id, but instead I want the user to select the kid id or create a new baby on the new account page.
How to do it?