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.
A55551fb23f6c239671008fba3df5f06?d=identicon&s=25 Silviu Miki (miki)
on 2009-03-27 07: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
36ed63ef68c172f148c491418395d0b5?d=identicon&s=25 rubyguy@ymail.com (Guest)
on 2009-03-27 07:57
(Received via mailing list)
On 27 Mar., 07:01, Silviu Miki <rails-mailing-l...@andreas-s.net>
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 Knorr
http://twitter.com/rubyguy
This topic is locked and can not be replied to.