Commit 1f207d907d207d1870ae90e1d9184da4c3264729
1 parent
3c4d2c8d
Exists in
master
and in
29 other branches
Task: remove dead code
Showing
1 changed file
with
0 additions
and
22 deletions
Show diff stats
app/models/task.rb
... | ... | @@ -139,28 +139,6 @@ class Task < ActiveRecord::Base |
139 | 139 | end |
140 | 140 | end |
141 | 141 | |
142 | - def requestor_is_of_kind(klass, message = nil) | |
143 | - error_message = message ||= _('Task requestor must be '+klass.to_s.downcase) | |
144 | - group = klass.to_s.downcase.pluralize | |
145 | - if environment.respond_to?(group) and requestor_id | |
146 | - requestor = requestor ||= environment.send(klass.to_s.downcase.pluralize).find_by_id(requestor_id) | |
147 | - end | |
148 | - unless requestor.class == klass | |
149 | - errors.add(error_message) | |
150 | - end | |
151 | - end | |
152 | - | |
153 | - def target_is_of_kind(klass, message = nil) | |
154 | - error_message = message ||= _('Task target must be '+klass.to_s.downcase) | |
155 | - group = klass.to_s.downcase.pluralize | |
156 | - if environment.respond_to?(group) and target_id | |
157 | - target = target ||= environment.send(klass.to_s.downcase.pluralize).find_by_id(target_id) | |
158 | - end | |
159 | - unless target.class == klass | |
160 | - errors.add(error_message) | |
161 | - end | |
162 | - end | |
163 | - | |
164 | 142 | def close(status, closed_by) |
165 | 143 | self.status = status |
166 | 144 | self.end_date = Time.now | ... | ... |