Class: InnerPlan::Lists::OngoingTasksComponent
- Inherits:
-
Phlex::HTML
- Object
- Phlex::HTML
- InnerPlan::Lists::OngoingTasksComponent
- Defined in:
- app/components/inner_plan/lists/ongoing_tasks_component.rb
Instance Method Summary collapse
-
#initialize(list, context: nil) ⇒ OngoingTasksComponent
constructor
A new instance of OngoingTasksComponent.
- #template ⇒ Object
Constructor Details
#initialize(list, context: nil) ⇒ OngoingTasksComponent
Returns a new instance of OngoingTasksComponent.
3 4 5 6 |
# File 'app/components/inner_plan/lists/ongoing_tasks_component.rb', line 3 def initialize(list, context: nil) @list = list @context = context end |
Instance Method Details
#template ⇒ Object
8 9 10 11 12 13 14 15 |
# File 'app/components/inner_plan/lists/ongoing_tasks_component.rb', line 8 def template tasks = @list.tasks.ongoing.ordered_by_position render( InnerPlan::Tasks::RowsComponent.new(tasks, list: @list, context: @context, id_key: :ongoing_tasks) ) end |