On 16 November 2014 16:11, Clay McCullough wrote:
Exactly. These are some problems I haven't figured out how to solve! This is my first web application. I have thought about all users clicking at the same time... What would be a good way to keep track of the users, have a record of the bidding, and increment the price the same amount every time? Would it be a method in the model or controller or what?
Exactly. These are some problems I haven't figured out how to solve! This is my first web application. I have thought about all users clicking at the same time... What would be a good way to keep track of the users, have a record of the bidding, and increment the price the same amount every time? Would it be a method in the model or controller or what?
comments at appropriate points, it makes it easier to follow the
thread. Otherwise someone seeing your previous message will have no
idea what you are saying 'exactly' to. Thanks.
Don't worry about where methods go yet, get the models and
associations sorted. It seems to me you are going to have to have
auctions, users, bids with appropriate associations. The +1 button
should not show +1 but show the new bid amount (current + 1) and that
value should be posted when he clicks, so there is no confusion over
the amount he is bidding. By keeping all the bids in the database
then you have a history of what happened.
You will need something like
user has many bids
auction has many bids
bid belongs to user
bid belongs to auction
Colin
--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/CAL%3D0gLsK2oU5NNAZ7Uw30NQb9kDsMVK1%2BDM6Aaq-opNtXTa2Qg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.