Gamingforce Interactive Forums
85240 35212

Go Back   Exploding Garrmondo Weiner Interactive Swiss Army Penis > Garrmondo Network > Help Desk
Register FAQ GFWiki Community Donate Arcade ChocoJournal Calendar

Notices

Welcome to the Exploding Garrmondo Weiner Interactive Swiss Army Penis.
GFF is a community of gaming and music enthusiasts. We have a team of dedicated moderators, constant member-organized activities, and plenty of custom features, including our unique journal system. If this is your first visit, be sure to check out the FAQ or our GFWiki. You will have to register before you can post. Membership is completely free (and gets rid of the pesky advertisement unit underneath this message).


Ruby on Rails Question
Reply
 
Thread Tools
DarkLink2135
River Chocobo


Member 5122

Level 24.05

Apr 2006


Reply With Quote
Old Apr 16, 2008, 05:31 PM #1 of 1
Ruby on Rails Question

I hope I put this in the right place =/. Anyway I'm having trouble figuring out how to do something. I know this is a really HORRIBLE design but it's what the professor wants, so I guess I have to follow that model.

Ok, so I'm working on an assignment right now and I've got a model that represents a football team. It has a name field, which has the name of the football team, and it has a single player field, which looks up values from my player model for the user to select.

I want to be able to add another player field - as many as I need to in order to fill the team with the amount of players the user wants to have.

What It Looks Like:
Name: [Text Field]
Player: [Drop-Down Box]

[Create Team Button]

What I want, essentially:

Name: [Text Field]
Player: [Drop-Down Box]
Player1: [Drop-Down Box]
Player2: [Drop-Down Box]

[Add Player Button]
[Create Button]

----------------------------------------

I basically need to add more fields to my database schema from the view. It doesn't need to have perfect formatting (ideally I'd have better names for player, player1, player2, etc)

I'm also not sure how to add in a blank value to the player list. Not all teams are going to have the same amount of players (eleven at bare minimum) and since I'm changing the schema that ALL teams must follow, one team might have 26 players, and another might just have 15, so some player fields need the option of having a null value for a player field.

-----------------------------------------

I am COMPLETELY stumped on this .

Jam it back in, in the dark.

FGSFDS!!!
Reply


Exploding Garrmondo Weiner Interactive Swiss Army Penis > Garrmondo Network > Help Desk > Ruby on Rails Question

Forum Jump


All times are GMT -5. The time now is 03:22 AM.


Powered by vBulletin® Version 3.8.9
Copyright ©2000 - 2025, vBulletin Solutions, Inc.