Forum: Ruby on Rails create a table per user

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Silviu M. (Guest)
on 2009-03-27 08:01
not sure what to look at...
how would i go about creating tables within the application? i have my
users  and say, for each one i want to create another table(s) when they
register, that would be customized to them and accessible only by them?

miki
(Guest)
on 2009-03-27 08:57
(Received via mailing list)
On 27 Mar., 07:01, Silviu M. <removed_email_address@domain.invalid>
wrote:
> not sure what to look at...
> how would i go about creating tables within the application? i have my
> users  and say, for each one i want to create another table(s) when they
> register, that would be customized to them and accessible only by them?

That kind of thing should never ever be done. Imagine when you reach,
maybe, a thousand users, you'll have at least thousand tables! Then
imagine when you need to make a change in the users' tables! I
strongly recommend to make use of Rails' has_many and belongs_to
associations to keep track of which records belongs to which users,
instead.

--
Best regards,
David K.
http://twitter.com/rubyguy
This topic is locked and can not be replied to.