Rails polymorphic user model with Devise
问题 So I know this question has been ask a ton of times but my question goes a little bit further. When modeling my application I have two types of users that have a polymorphic association to the user model. Such as: class User < ActiveRecord::Base belongs_to :profileable, :polymorphic => true end class User_Type_1 < ActiveRecord::Base has_one :user, :as => :profileable end class User_Type_2 < ActiveRecord::Base has_one :user, :as => :profileable end The reason I did this, instead of an STI, is