rails belongs_to custmomization
I read in some code this
attr_accessible :namespace_id, :creator_id, as: :admin belongs_to
:creator, foreign_key: "creator_id", class_name: "User"
Why not simply declare a user_id in the model (and in table), and then
simply use belongs_to :user ? Btw, is now creator an alias to creator_id ?
No comments:
Post a Comment