You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to rubyonra...@googlegroups.com
I would like to create a web application that has two types of users, producer and consumer.
Both users have three fields in common : username,password and email. Producer has also the fields address and telephone.
I could make separate models,views,controller and tables for each user types but this violates DRY. Could Single table inheritance be used and how?
Colin Law
unread,
Mar 27, 2012, 12:28:25 PM3/27/12
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to rubyonra...@googlegroups.com
I would probably keep it simple and have a users table with all the fields in (leave the ones you don't need empty) and use the cancan gem to give the different types of users different roles.