Class: RailsWorkflow::OperationHelperDecorator
Instance Method Summary
collapse
Methods inherited from Decorator
collection_decorator_class
Instance Method Details
#assigned_to ⇒ Object
7
8
9
10
11
12
13
14
15
|
# File 'app/decorators/rails_workflow/operation_helper_decorator.rb', line 7
def assigned_to
object.assignment.try(:email) || begin
[
::User.role_text(object.role),
::User.group_text(object.group)
].compact.join(", ")
end
end
|
#completed_at ⇒ Object
21
22
23
24
25
|
# File 'app/decorators/rails_workflow/operation_helper_decorator.rb', line 21
def completed_at
if object.completed_at.present?
object.completed_at.strftime('%m/%d/%Y %H:%M')
end
end
|
#created_at ⇒ Object
17
18
19
|
# File 'app/decorators/rails_workflow/operation_helper_decorator.rb', line 17
def created_at
object.created_at.strftime('%m/%d/%Y %H:%M')
end
|