Ruby on Rails Friday, July 1, 2016

I don't think you need to use polymorphism for this.

I'd use STI for users and just keep the very basics in the user
table(profile name, email address, type etc). Then have something like
chef_info and athlete_info tables which contain the rest of the
differing information for each user type. This way you don't have a lot
of nil values in columns in your user table.

--
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 unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/81fb7e7184c77d74b1af74ca4b54c02d%40ruby-forum.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment