I'm trying to figure out how to use check boxes to select multiple
records and update them accordingly depending on what button a user
presses (think GMail http://i.imgur.com/94DUi.jpg e.g., delete, archive,
etc).
There's a really great Railscasts
When I do remote form submits through jQuery .submit() why do I
sometimes have to refresh the page manually to see the results?
My jQuery handler is very simple:
$(#vote_yes).click(function() {
$(#approval).val(true)
$(.edit_vote).submit()
});
And the link that leverages
I'm unable to figure out how to submit specific data to a Rails update()
method via the jQuery submit() method. This is the code snippet I'm
working with:
% form_for(vote, :remote = true) do |f| %
%= check_box_tag selection, vote.id %
% end %
...
%= link_to 'Vote Yes', ballots_path,
First, a picture of what I'm doing: http://i.imgur.com/MO2o8.png
A user should be able to select as many of these checkboxes and click on
the Vote Yes or Vote No links (styled as buttons) to change their
vote to yes or no (vote.approval = true or vote.approval = false).
I got it working so that
Frederick Cheung wrote in post #996132:
Have you checked the browser's JavaScript console for any errors? That
last line looks suspicious to me. I would have thought $
(value.form).submit() would suffice.
Also I think this general approach might be built on slightly shaky
approach - Since the
5 matches
Mail list logo