I have a model called "task" that contains two belongs_to for another model "user"
belongs_to :user, foreign_key: "poster_id", dependent: :destroy belongs_to :user, foreign_key: "runner_id" belongs_to :job_sub_category belongs_to :job_category
In my views Im able to perform the following to retrieve the job_sub_category "name" field.
I also want to perform similar operation n the user model, such as this:
This of course errors "no method name on fixed num, but how would I be able to get the name of the user that exists in runner_id and for that matter the name of the user for poster_id.??