I''ve observed and repeated the factory design detailed at http://www.artima.com/rubycs/articles/modular_apis_with_rubyP.html but I would like something a little cleaner. The details are such that I have 3 types of users: managers, employees and customers. I''ve abstracted the user security API such that Manager < User Employee < User Customer < User and the User class has all of the authentication methods such as "set_password", "check_password", etc. Now, for the authentication controller. I have my route mapping such that /authenticate/:user_type/:action I''d like to have something similar to the following as my authentication code: class Authenticate < ActionController::Base def authenticate @user = User.find(@params[:user_type], @params[:user][:email_address]) if @user and @user.check_password(@params[:user][:password]) render(:text => "Success") else render(:text => "Failure") end end end Make sense? Any thoughts/ideas appreciated. Thank you! Dave Hawkins -- Quis custodiet custodes ipsos? -dh --~--~---------~--~----~------------~-------~--~----~ 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---