Re: [Rails] increment?

2011-03-10 Thread Colin Law
On 10 March 2011 16:18, Mark wrote: > Hi > > I am wondering if anyone can assist with this: > > I have two models, one is task and the other is examples.  I have > developed an application that once you create a new task you are given > 5 example fields. > > What I need is when a user wants to cre

[Rails] increment?

2011-03-10 Thread Mark
Hi I am wondering if anyone can assist with this: I have two models, one is task and the other is examples. I have developed an application that once you create a new task you are given 5 example fields. What I need is when a user wants to create a new task, he/she is given a list of five uniqu

[Rails] increment attribute while SHOW

2010-04-09 Thread tom
hi, im trying to do: def show @advisor = Advisor.find(params[:id]) @advisor.reviews = @advisor.reviews + 1 #reviews is just an integer @advisor.save! how can i implement a "show"-counter? thx -- You received this message because you are subscribed to the Google Groups "

[Rails] Increment Count and display

2009-09-28 Thread bbrocks
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,

[Rails] Increment counter on download

2009-08-17 Thread Rails List
i am offering my site visitors a download of zip file. when someone downloads it, i want to increment a counter and update db. how do i do that? -- Posted via http://www.ruby-forum.com/. --~--~-~--~~~---~--~~ You received this message because you are subscribed