Im tryign to update a model of mine so that it will have a created_by and updated_by field. Looking into some questions and answers here, it seems I don’t have the same problem as them.
My TestCase model should have a created_by and updated_by foreign key, but it should both be a User class. Is that possible?
something like:
belongs_to :user, :foreign_key => 'created_by'
belongs_to :user, :foreign_key => 'updated_by'
Keep in mind that created by and updated_by can be different(meaning another user can edit the testcase)
Try to use:
You should refer to that objects through: