search for: counter_path

Displaying 1 result from an estimated 1 matches for "counter_path".

Did you mean: count_path
2007 Feb 24
2
RESTful PUT and button_to
...count, and clicked "submit". And that''s where I get hung up. How do I create a link (or button) in the view which will call "update" in this way? Here''s one attempt I made: <%= h @counter.content %> <%= button_to "++", counter_path( :id => @counter, :counter => { :count => @counter.count + 1 } ), :method => :put %> But that''s wrong for two reasons. First, the counter_path helper flattens the nested hash, so the for a counter with id 1 and count==4...