Im trying to implement knockoutjs in my formtastic page. How can i bind data to a scaffold edformtastic erb page.
This is how i tried it. But didn't work
<%= f.input :name, :data=>{:bind=>'value: name'} %>
my javascript
this.name = ko.observable("Bert");
I don't know how knockoutjs works, but for the formtastic part, you should do this:
<%= f.input :name, :input_html => {"data-bind" => "value: name" } %>
I'm not the one who voted down. ;-) (I'll vote up).