Hello, right now I have a boolean set up to trigger when a user clicks a link. Is there a way to give some feed back to user to return how many times separate booleans on a page have been clicked and keep track of this in a database. For example a page may have ten booleans a user can trigger on and off (to undo). When the user clicks each one I want it to return the number of times each boolean has been triggered on. So if the user clicked the 7th one I want it to return 7 and if they undo one around like 4 I want 7 to update to 6. Is this possible? Does this make sense? --~--~---------~--~----~------------~-------~--~----~ 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
edberner wrote:> Hello, right now I have a boolean set up to trigger when a user clicks > a link. Is there a way to give some feed back to user to return how > many times separate booleans on a page have been clicked and keep > track of this in a database. > > For example a page may have ten booleans a user can trigger on and off > (to undo). When the user clicks each one I want it to return the > number of times each boolean has been triggered on. So if the user > clicked the 7th one I want it to return 7 and if they undo one around > like 4 I want 7 to update to 6. Is this possible? Does this make sense?what are you trying to do? -- Posted via http://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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
>> For example a page may have ten booleans a user can trigger on and off >> (to undo). When the user clicks each one I want it to return the >> number of times each boolean has been triggered on. So if the user >> clicked the 7th one I want it to return 7 and if they undo one around >> like 4 I want 7 to update to 6. Is this possible? Does this make sense?It''s possible. but i am not sure that it will make sense by decreasing amount of clicked if user undo boolean. Have you tried to code it? Reinhart http://teapoci.blogspot.com -- Posted via http://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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Yes but I ran into a roadblock. I set up habtm between actions and teams and every time I added a hit I just would adjust the hit in the team. But As it turns out tree is a habtm between games and teams and it is all getting very confusing very fast. I need something like team.sum (action.hits) All in all I I''m lost in how to implemnt this. On Apr 18, 2008, at 4:15 AM, Visit Indonesia 2008 <rails-mailing-list-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org > wrote:> > >>> For example a page may have ten booleans a user can trigger on and >>> off >>> (to undo). When the user clicks each one I want it to return the >>> number of times each boolean has been triggered on. So if the user >>> clicked the 7th one I want it to return 7 and if they undo one >>> around >>> like 4 I want 7 to update to 6. Is this possible? Does this make >>> sense? > > It''s possible. but i am not sure that it will make sense by decreasing > amount of clicked if user undo boolean. Have you tried to code it? > > Reinhart > http://teapoci.blogspot.com > -- > Posted via http://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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Ellis Berner wrote:> Yes but I ran into a roadblock. I set up habtm between actions and > teams and every time I added a hit I just would adjust the hit in the > team. But > As it turns out tree is a habtm between games and teams and it is all > getting very confusing very fast. I need something like team.sum > (action.hits) > All in all I I''m lost in how to implemnt this. >I am not too clear with your problem, if you have coded it, would you mind to show me? or email me to reinhart.showbiz ~[at]~ live.com. if i am clear with your problem maybe i can help you to implement it. Please choose another example that i can understand clearly. But I clear your explain here:>For example a page may have ten booleans a user can trigger on and off >(to undo). When the user clicks each one I want it to return the >number of times each boolean has been triggered on. So if the user >clicked the 7th one I want it to return 7 and if they undo one around >like 4 I want 7 to update to 6. Is this possible? Does this make sense?simple code : example the table OPTIONS has option boolean entities/columns that are A, B, C, D, E, F, G, H, I, J., the secenario is like this : [1] User click D, controller will asl to Model to save "D" into table user example to column "clicked". After it, Model option will be commanded too, so table OPTIONS in column D is updated for new amount of clicked. [2] But User changes his mind to choose G now. Controller will commend User Model to update table User in column "clicked" to be G. Before change it, Model Options must be run first to update column G by increasing amount there and column D by decreasing amount there. How to get D (Previous choosen from user) is from find or read Table User first, before it will be updated to be G. That;s it? or you have different thinking? Reinhart http://teapoci.blogspot.com -- Posted via http://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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---