I'm wondering if there is way to submit extra parameters with
<%= in_place_editor_field :model, :attribute %>
For example, if I wanted to submit the current time or something like
that to run through my own custom set_model_attribute method that is
called when the editor is saved.
Thanks in advance
p.s. sorry if this is a double post, I think my first attempt failed.
My javascript.fu
is not strong. It’s my understanding that you need to construct the parameters for the url in javascript. I’m sure there are nicer ways of doing this.
I believe something like that. I think there are things in prototype.js to assist with this. Serialize on forms may help.
You need a string within a string. The above starts with a " for rubys sake, then immediately has a single ’ for js. Anything in the single will be a literal for js, and anything just in the double " will be executed in js as a function.