Daniel Drehmer wrote:
> I'm a newbie in the programming world and I need some advice regarding
> the best way of achieving the task I'm gonna describe.
> 
> I've got an User model and another model called Sandbox.
> 
> Now I want to make each sandbox have an "owner" (administrator), who
> is also an user. The user will be able to own several sandboxes.
> 
> Than I want sandboxes to also have "participants" (who are Users, from
> the User model/table, but without admin status). A Sandbox should be
> able to have many participants and a User should be able to
> participate in many sandboxes.
> 
> Any idea of how to approach this?

Do a little research on "belongs_to", "has_many", 
"has_and_belongs_to_many" (also known as HABTM), as well as primary / 
foreign keys in databases.
It should give you, hopefully, the insight to go on.
-- 
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