Hello, I want to learn ruby. As a learning experience I want to write a programm which people can put the results of games in a tournament. The programm produces which team is first and so on. My question is : 1) Are there any tutorials about making a menu and working space ? 2) Are there any tutorial about how i can check if a team has already played a game. 3) Are there any totorials about how I can sort the teams on multiple things ? Roelof -- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Hello, Really nobody who wants to help ? Roelof On 26 mei, 19:17, Roelof Wobben <li...-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org> wrote:> Hello, > > I want to learn ruby. > As a learning experience I want to write a programm which people can put > the results of games in a tournament. The programm produces which team > is first and so on. > > My question is : > > 1) Are there any tutorials about making a menu and working space ? > 2) Are there any tutorial about how i can check if a team has already > played a game. > 3) Are there any totorials about how I can sort the teams on multiple > things ? > > Roelof > -- > 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Actually, the goal is trivial. Check out http://guides.rubyonrails.org/getting_started.html Install ruby, gem, rails, and start developing, ask questions as you go along. There''s no such thing as tutorial for a menu or working space. Checking whether a team has already played the game is a matter of your model. For instance, you have a model called Team, which has a boolean field called played_game. So, you just get teams via Team.find, and include your condition, or just use team.played_game and check whether it''s true or no. Good luck On May 26, 8:17 pm, Roelof Wobben <li...-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org> wrote:> Hello, > > I want to learn ruby. > As a learning experience I want to write a programm which people can put > the results of games in a tournament. The programm produces which team > is first and so on. > > My question is : > > 1) Are there any tutorials about making a menu and working space ? > 2) Are there any tutorial about how i can check if a team has already > played a game. > 3) Are there any totorials about how I can sort the teams on multiple > things ? > > Roelof > -- > 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
On May 27, 9:33 am, roelof <rwob...-PkbjNfxxIARBDgjK7y7TUQ@public.gmane.org> wrote:> Hello, > > Really nobody who wants to help ?I think you questions are a mixture of over vague and over specific, for example i don''t think you''ll ever find a tutorial for your second question as that''s quite a narrow question that depends quite tightly on how you''ll decide to store the team & tournament data. Your first question on the other hand is very vague. I think you should probably be looking for some basic active record tutorials (perhaps read some of the guides at guides.rubyonrails.org) before trying to find something more specific to what you''re trying to do. Fred> > Roelof > > On 26 mei, 19:17, Roelof Wobben <li...-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org> wrote: > > > > > Hello, > > > I want to learn ruby. > > As a learning experience I want to write a programm which people can put > > the results of games in a tournament. The programm produces which team > > is first and so on. > > > My question is : > > > 1) Are there any tutorials about making a menu and working space ? > > 2) Are there any tutorial about how i can check if a team has already > > played a game. > > 3) Are there any totorials about how I can sort the teams on multiple > > things ? > > > Roelof > > -- > > 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Alex P wrote:> Actually, the goal is trivial. > Check out http://guides.rubyonrails.org/getting_started.html > > Install ruby, gem, rails, and start developing, ask questions as you > go along. There''s no such thing as tutorial for a menu or working > space. > Checking whether a team has already played the game is a matter of > your model. For instance, you have a model called Team, which has a > boolean field called played_game. So, you just get teams via > Team.find, and include your condition, or just use team.played_game > and check whether it''s true or no. > > Good luckHello, Thank you. I will read the gettting_started tutorial. I like the idea of you. One question. How do I set the boolean field. My idea was to make a database of all the played games. Then read that database one or one if the user choose for making the rankings. I have he idea I have to read a lot to make this idea work. Roelof -- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Hello, To make it more clear. What I have in mind is this: Make a application with a menu which contains a input choice and a rankings choice. If the user chooses for input the user gets a form so the data can be in the database. If the user chooses for rankings the followrig occurs. Every rule in the database is be read. Then there is a check if the team has already played a game. If so, then the data will changed . If not, team is added to a array and the data willbe changed. After that the data will be sorted so the best team is displayed first and so on. Database will look like this : Home team Away team Score home team Score away team. Array looks like this : Team Played games game points points made by that team points the other teams made in games with this team. example team A played 3 games, won 2 , made 50 , other teams made 20 team : A game points 2*3=6 points : 50 points : 20 I hope it''s now clear what i have in mind. Roelof -- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Well, it''s all quite simple. Create a model script/generate model team played_game:boolean name:string and it will generate model and migration for you :) Just get trough the tutorial. I guarantee, you''ll find all the answers. For your particular application it will work 100% On May 27, 2:40 pm, Roelof Wobben <li...-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org> wrote:> Alex P wrote: > > Actually, the goal is trivial. > > Check outhttp://guides.rubyonrails.org/getting_started.html > > > Install ruby, gem, rails, and start developing, ask questions as you > > go along. There''s no such thing as tutorial for a menu or working > > space. > > Checking whether a team has already played the game is a matter of > > your model. For instance, you have a model called Team, which has a > > boolean field called played_game. So, you just get teams via > > Team.find, and include your condition, or just use team.played_game > > and check whether it''s true or no. > > > Good luck > > Hello, > > Thank you. > I will read the gettting_started tutorial. > > I like the idea of you. > One question. How do I set the boolean field. > > My idea was to make a database of all the played games. > Then read that database one or one if the user choose for making the > rankings. > > I have he idea I have to read a lot to make this idea work. > > Roelof > -- > 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.