Commit 765604784f63f556a3b44ce38e28df3bcb4606b0
1 parent
c0c8151c
Exists in
master
and in
29 other branches
Expanding task requestor for Profile
Showing
2 changed files
with
2 additions
and
2 deletions
Show diff stats
app/models/task.rb
@@ -31,7 +31,7 @@ class Task < ActiveRecord::Base | @@ -31,7 +31,7 @@ class Task < ActiveRecord::Base | ||
31 | end | 31 | end |
32 | end | 32 | end |
33 | 33 | ||
34 | - belongs_to :requestor, :class_name => 'Person', :foreign_key => :requestor_id | 34 | + belongs_to :requestor, :class_name => 'Profile', :foreign_key => :requestor_id |
35 | belongs_to :target, :foreign_key => :target_id, :polymorphic => true | 35 | belongs_to :target, :foreign_key => :target_id, :polymorphic => true |
36 | 36 | ||
37 | validates_uniqueness_of :code, :on => :create | 37 | validates_uniqueness_of :code, :on => :create |
test/unit/task_test.rb
@@ -14,7 +14,7 @@ class TaskTest < ActiveSupport::TestCase | @@ -14,7 +14,7 @@ class TaskTest < ActiveSupport::TestCase | ||
14 | t.requestor = 1 | 14 | t.requestor = 1 |
15 | end | 15 | end |
16 | assert_nothing_raised do | 16 | assert_nothing_raised do |
17 | - t.requestor = Person.new | 17 | + t.requestor = Profile.new |
18 | end | 18 | end |
19 | end | 19 | end |
20 | 20 |