> Creating a named scope on the fly like that is really rather odd (and
> completely unnecessary). i'm also not sure why you don't just do
> @schedule = team.schedules.find :all, :order => '...'
> If you want you can add a named scope on schedules with the order you
> want and do
> 

It was just some thrown together code - not staying like that 
permanently.  I create named scopes mostly for pagination or for 
reusability in multiple methods.

> Why not put the team_id for the opponent in the schedules table ?
> 

I can't parse the schedules from ncaa.org so I'm having to enter every 
team's schedule by hand into the table initially.

120 teams x 12 rows = 1,440 team_ids..

I would have to look up each team id manually in order to verify and 
place them in there.  Whereas when I manually enter the data in right 
now, I simply am entering schedules via printouts.  I would hate to have 
to verify 1,440 IDs but if that's the best way to do this then I will.

The name of the column would have to be different though.  I can't have 
two team_id columns in my schedules table.

I was really hoping there was a way to query the teams table and find 
the team_id for the name == opponent from the schedules table..
-- 
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 [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to