Displaying 1 result from an estimated 1 matches for "taskus".
Did you mean:
tasks
2007 Dec 04
10
ActiveRecord::AssociationTypeMismatch
I have the requirement to empty the association records and add the
association records as new (as below).
@task = Task.find(params[:task_id])
@task.task_users = []
params[:ids].split(", ").each do |court_user_id|
task_user = TaskUser.new(:court_user_id => court_user_id)
@task.task_users << task_user
end
@task.save
This is not working. Following error is thrown.
ActiveRecord::AssociationTypeMismatch (TaskUser expected, got TaskUser):
C:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.15.6/lib/active_record/asso...