class WorkItemController < ApplicationController def start_time_entry work_item = WorkItem.find(params[:id]) Toggl::start_time_entry( description: work_item.title, project_id: work_item.course.toggl_project, ) end def complete work_item = WorkItem.find(params[:id]) work_item.complete! end end