On 25 March 2012 09:52, pavlos kallis <[email protected]> wrote: > 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?
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. Colin -- 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.

