On Tue, Jan 14, 2014 at 2:52 AM, Thompson Edolo <[email protected]> wrote:
> Thanks for replying. I'm not really sure I know what a "Test fixture" is
> though. This is what I'm trying to do. The soccer league in my country
> doesn't have any true sites like ESPN Soccernet.com. I am trying to
> replicate that.
>
> I have a fixture model, it has a home_team column and an away_team column.
> These columns are supposed to be foreign keys to a Team model, I don't know
> how to set that up.
>
> Then I have a scheduled_at column and a played column that is a Boolean. I'd
> like a scenario where the fixtures/index shows all the matches for the
> present week with a calendar to browse future and past fixtures.

Everything you said pretty much confused me until I sat down and
thought about how I would design the app based on what you described
was happening and this is what I came up with:
https://gist.github.com/envygeeks/8416079 even if it's not right it
should get you started off hopefully, you can find more information
about what all that is here:
http://guides.rubyonrails.org/association_basics.html

-- 
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 [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/rubyonrails-talk/CAM5XQnwhB1Fkup21Fb2A%3Dcq%3DYR6dmfZJ%3D3z0aMg7MiLz0RpqVg%40mail.gmail.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to