diff --git a/app/models/cms/task.rb b/app/models/cms/task.rb index 796ddecb2..d06e83afa 100644 --- a/app/models/cms/task.rb +++ b/app/models/cms/task.rb @@ -4,8 +4,8 @@ class Task < ActiveRecord::Base CANT_ASSIGN_MESSAGE = "must have permission to assign tasks" CANT_BE_ASSIGNED_MESSAGE = "must have permission to be assigned tasks" include Cms::DomainSupport - belongs_to :assigned_by, :class_name => 'Cms::User' - belongs_to :assigned_to, :class_name => 'Cms::User' + belongs_to :assigned_by, :class_name => 'Cms::PersistentUser' + belongs_to :assigned_to, :class_name => 'Cms::PersistentUser' belongs_to :page, :class_name => 'Cms::Page' extend DefaultAccessible diff --git a/app/views/cms/tasks/new.html.erb b/app/views/cms/tasks/new.html.erb index 73e9fc77d..1a9360f83 100644 --- a/app/views/cms/tasks/new.html.erb +++ b/app/views/cms/tasks/new.html.erb @@ -10,7 +10,7 @@ <%= render layout: 'form_with_buttons', locals: {f: f} do %> <%= f.association :assigned_to, label: "Assign To", - collection: Cms::User.active.able_to_edit_or_publish_content.order("first_name, last_name, login"), + collection: Cms::PersistentUser.active.able_to_edit_or_publish_content.order("first_name, last_name, login"), include_blank: false, label_method: :full_name_with_login %> diff --git a/lib/cms/behaviors/userstamping.rb b/lib/cms/behaviors/userstamping.rb index 70540f894..b10d6236e 100644 --- a/lib/cms/behaviors/userstamping.rb +++ b/lib/cms/behaviors/userstamping.rb @@ -13,8 +13,8 @@ def is_userstamped(options={}) extend ClassMethods include InstanceMethods - belongs_to :created_by, :class_name => "Cms::User" - belongs_to :updated_by, :class_name => "Cms::User" + belongs_to :created_by, :class_name => "Cms::PersistentUser" + belongs_to :updated_by, :class_name => "Cms::PersistentUser" before_save :set_userstamps