I am trying to use Ruby on Rails' built in in_place_editor_field helper.
Which in theory makes a paragraph of text on my screen editable right
where it sits.
I've followed all of the documentation I could find very carefully, but
no matter what I do it still will not work even in the simplest example.
Which from my understanding, this should make a paragraph of text that
reads 'description' which I can click, edit, and save.
Controller (Right under the controller declaration):
in_place_edit_for :product, :description
<%= in_place_editor_field :product, 'description' %>
In the View header:
This throws the error when I launch it: *Called id for nil, which would
mistakenly be 4 -- if you really wanted the id of nil, use object_id*
around here: *<%= in_place_editor_field :product, 'description' %>* This
is a real bummer because I want to do something a little bit more
complex, I want to edit fields in a database but it goes without saying
those examples I couldn't make work either from the get go.
You need an instance variable "@product" at the time the view is
rendered - do you have one?
Same for new/create.