On 20/05/2009, at 3:21 AM, Morgan Morgan <[email protected]
> wrote:
>
> it's basically just a calendar view from 8am to 12pm with colours for
> each of the schedule types returned
>
> so it's a grid
>
> b = blue
> r = red
> there are actually 5 colours but in the interest of berevity i chose
> two.
>
> 8:00 9:00 10:00 11:00 12:00 1:00 2:00 3:00 4:00 5:00
> 6:00 7:00
> name0 b b r r r b r b b
> r b
> r
> name1 b b r r r b r b b
> r b
> r
> name2 b b r r r b r b b
> r b
> r
> name3 b b r r r b r b b
> r b
> r
> name4 b b r r r b r b b
> r b
> r
> name5 b b r r r b r b b
> r b
> r
> name6 b b r r r b r b b
> r b
> r
>
> this represents one of the 7 days and the type of schedule is
> determined
> in a db table.
>
>
> --
> Posted via http://www.ruby-forum.com/.
>
>
So you have a model hour, and it belongs to a model hour type and also
belongs to a user?
Then your controller loads users, :include => hours and hour type
Then, your view loops the users one row per user, loops one cell per
hour, and prints the type.
Simple?!
Blog: http://random8.zenunit.com/
Twitter: http://twitter.com/random8r
Learn: http://sensei.zenunit.com/
New video up now at http://sensei.zenunit.com/ real fastcgi rails
deploy process! Check it out now!
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---