I need to help with the documentation effort - there is no mention of
the :with parameter anywhere in the API docs. for remote_function, nor
link_to_remote. If you look in the source for the options_for_ajax()
function, you’ll find the use of the :with parameter. But that seems a
little more difficult than it should be.
Though I do notice that you shouldn’t need the :with in the first place.
The
Rails helpers should automatically send back
params[:job_history_filter_period] through remote_function, though I may
be
wrong.
Though I do notice that you shouldn’t need the :with in the first place.
The
Rails helpers should automatically send back
params[:job_history_filter_period] through remote_function, though I may
be
wrong.
Jason
Jason,
You’re right that I probably could have used an observer, but I don’t
need to update anything on the page. I just need to notify the server
that something has changed.
The “automatically sending back params[:job_history_filter_period]”
would happen if I were sending form contents back, but I’m not.
Originally, I tried that (with a form_remote_tag around the select), but
it wouldn’t work because you can’t use JS to submit a form. So I ended
up with this approach, which is the most direct, I think.
Thanks,
Wes
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.