When I click on the button it says No action defined. The click and
the method is not linking properly. Is there something wrong in the
syntax?

On Sep 28, 1:34 pm, Marnen Laibow-Koser <rails-mailing-l...@andreas-
s.net> wrote:
> bbrocks wrote:
> > 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
> >   �[email protected]_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?
>
> Why don't you think you're doing it right?  What's the problem?
>
>
>
> > And how can i display it in the same page?
>
> Best,
> --
> Marnen Laibow-Koserhttp://www.marnen.org
> [email protected]
>
> --
> Posted viahttp://www.ruby-forum.com/.
--~--~---------~--~----~------------~-------~--~----~
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