Hey @celo you’re pretty close. I think it is because you’re passing in the value as book.name when you want to pass in just something like bookName or just book which is what you are expecting in your controller.
I think it is fine if the button is outside of the form, but don’t forget to pass in the {{action "actionName"}} to the button element.
In the twiddle above, I’ve put the button inside the form and binded the action to the form so that you get the added benefit of if the user hits return after they fill in the field then the action will still trigger.
Hm… i didn’t get, In your example, you are defining the form in the main template, in my case i’m defining in the main.new template.
If i put my form in the main template i can access the attributes, but if i use the form in a nested template, i can’t access the attributes, will just print undefined.
REALLY?? I need a controller to my new template??? I didn’t know that :OOOOO… But… that’s too many controllers hahhaa…
But i have a problem i think…
I kindle have a save button generic for all my nested routes… so, if i click in save, this will fire up the action in the controllers/books.js, not in the controllers/books/new.js, right?