hello, I have a column hit in my responses table, and I need to create a button beside every response. And when the button is clicked, the counter value should be incremented and displayed on the same page.
I created a method in mycontroller, def update_hit @response.update_attribute :hit, params[:count] + 1 end and in the view <%= button_to "Click" , response, :action => update_hit %> I am not sure if I am doing it the right way. What can I do about this? And how can i display it in the same page? --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---

