Sure, that's a has_and_belongs_to_many thing then.
This can be done two ways.
The simple one (needs no model):
create a relation table named users_tasks which contains user_id and
Then you can use all the common functions
@user.tasks << Task.new(...params...)
@user.tasks.each do |task|...
and so on
Disadvantage of this approach is, that you can't store more
in the intermediate table and can't access it in other ways, since it
model of it's own.
Lots of Rails programmers (if not most) go another way, slightly more
work to setup, but with more options:
Create a model name UserTasks (columns: id, user_id, :task_id and
whatever information you may need), then
has_many :tasks :through :user_tasks
has_many :users :through :user_tasks
The tricky part (ok, not so tricky) is the through option which
relations over the intermediate table, so in the end you can again do
and get them all