First of all, I wanted to give a harty "thank you" to James Adams for 
creating rails engines, which seems like a very natural way to increase 
codesharing and productivity.

My question is how have people implemented different types of users in 
their Web applications?

As for my application, I use single table inheritance in order to derive 
several different types of users, such as "moderators," "editors," etc 
...

For example, let's say that I want to create a moderator. I define a new 
moderator class and Controller like so:

class Moderator < User
end

class ModeratorController < UserController
end

My problem with this is that since several functions such as "login," 
"signup" and others directly call the User class. I cannot simply 
inherit the ModeratorController from UserController without overriding 
everyone of these functions and changing every instance of "User" with 
"Moderator"

I think there must be a simple and elegant solution to this.  Any 
suggestions?

-- 
Posted via http://www.ruby-forum.com/.
_______________________________________________
engine-users mailing list
[EMAIL PROTECTED]
http://lists.rails-engines.org/listinfo.cgi/engine-users-rails-engines.org

Reply via email to