My task manager has a task model:
class Task < ActiveRecord::Base
belongs_to :user # responsible of the task
By adding belongs_to :user, my task objets have a user method:
name = Task.find(1).user.name
I'd like to add a creator (or created_by) method pointing to the user
How can I do that ?
Something like belongs_to :user, :name=>'creator' # creator of the task,
refering to creator_id in the Task table.
Thanks for your pointers,