Class: WorkItems::Widgets::CurrentUserTodos

Inherits:
Base
  • Object
show all
Defined in:
app/models/work_items/widgets/current_user_todos.rb

Instance Attribute Summary

Attributes inherited from Base

#work_item

Class Method Summary collapse

Methods inherited from Base

api_symbol, callback_class, #initialize, #type, type

Constructor Details

This class inherits a constructor from WorkItems::Widgets::Base

Class Method Details

.process_quick_action_param(param_name, value) ⇒ Object



14
15
16
17
18
# File 'app/models/work_items/widgets/current_user_todos.rb', line 14

def self.process_quick_action_param(param_name, value)
  return super unless param_name == :todo_event

  { action: value == 'done' ? 'mark_as_done' : 'add' }
end

.quick_action_commandsObject



6
7
8
# File 'app/models/work_items/widgets/current_user_todos.rb', line 6

def self.quick_action_commands
  [:todo, :done]
end

.quick_action_paramsObject



10
11
12
# File 'app/models/work_items/widgets/current_user_todos.rb', line 10

def self.quick_action_params
  [:todo_event]
end