ruby on rails - Devise authentication for polymorphic solution -
consider application, needs have 2 different types of user:
userin standard clientorganizationentity offering services through application
requirements:
- different standard controllers (sessions, registrations etc)
- access different parts of application of course
this seems walk in park creating 2 separate models devise, wouldn't duplicate functionality authentication.
i went polymorphic association, organization , user different models, both 1-1 relation entity representing authentication. entity has devise attributes (like password etc), while others have type-specific ones. unfortunately solution comes lot of drawbacks, having define custom helpers, warden strategies , devise failure apps.
i'm wondering, there concise solution type of issue?
ideally, having 2 devise models delegating regarding authentication separate entity.
Comments
Post a Comment