I have a blog on my site and would like readers to be able to
recommend comments.

I added an integer column to my comments table called 'agree' and have
a link to a controller which increments the entry in that column by
one on each click.

I just use @comment.increment!("agree") and then redirect back to the
blog.

However, I am paginating the comments and if you recommend a comment
on page 2, for example, the redirect goes back to the default page 1.

Is there a way to increment the table entry using some ajax in the
controller?

I am quite unfamiliar with Ajax and haven't been able to get it to
work.

Thanks

Dan
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to