Friday, May 24, 2013

[Rails] Re: Should Customers and Admins be on Separate Tables?

I think you should have two separate tables and two controllers. for administrators, you will have more controllers. Many people will put them in a module and add namespace in routes.rb file to visit them.

On Saturday, May 25, 2013 10:55:53 AM UTC+8, Peter wrote:
Can I please get everyone's opinion? Should customers and admins be on separate tables? I'm developing an application that has two kinds of users, a customer and an administrator.

The application basically is a shopping cart. Customers from the internet create their accounts so they are able to buy my products. But there are also administrators (admins). Admins are my employees. They maybe call new customers and try to sell them my products. They have the ability to create, update and manage customers' accounts. Admins are able to buy products for customers upon their request. I hope that makes sense.

Given that admins and customers have different roles but are the same objects, users, should they be in separate tables? Thank you.

--
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/2c869ef6-3246-41bf-9670-12c5eba72f0d%40googlegroups.com?hl=en-US.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate