I am wondering whether there is a way to do this with rails or not. Basically I have a user model and an event model. Event is created by a user and I want to have a foreign
Simply pass some options to belongs_to:
belongs_to
belongs_to :creator, :class_name => "User", :foreign_key => "user_id"
This specifies that the creator method will be a User object, referencing the user_id field.
creator
User
user_id