Class: RailsWorkflow::OperationHelperDecorator
Instance Method Summary
collapse
Methods inherited from Decorator
collection_decorator_class
Instance Method Details
#assigned_to ⇒ Object
6
7
8
9
10
11
12
13
|
# File 'app/decorators/rails_workflow/operation_helper_decorator.rb', line 6
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
19
20
21
22
23
|
# File 'app/decorators/rails_workflow/operation_helper_decorator.rb', line 19
def completed_at
if object.completed_at.present?
object.completed_at.strftime('%m/%d/%Y %H:%M')
end
end
|
#created_at ⇒ Object
15
16
17
|
# File 'app/decorators/rails_workflow/operation_helper_decorator.rb', line 15
def created_at
object.created_at.strftime('%m/%d/%Y %H:%M')
end
|