I sorta feel that organization.owner_auto_attach_all_systems_task_id would be better served having the task looked up in the controller and having it passed in as a local variable to the view.     It would make it go from:

 +  %input.btn#auto_attach_all_button{ :value => _("Auto-attach available subscriptions to all systems"), :type => "button", 'data-url' => api_organization_auto_attach_all_systems_path(organization.label), 'data-method' => "post", 'data-taskstate' => task_status_lookup(organization.owner_auto_attach_all_systems_task_id, :state), 'data-taskuuid' => task_status_lookup(organization.owner_auto_attach_all_systems_task_id, :uuid) } 

to  

 +  %input.btn#auto_attach_all_button{ :value => _("Auto-attach available subscriptions to all systems"), :type => "button", 'data-url' => api_organization_auto_attach_all_systems_path(organization.label), 'data-method' => "post", 'data-taskstate' => attach_task.state, 'data-taskuuid' => attach_task.uuid }

attach_task could even be nil (i thinK) if org.owner_auto_attach_all_systems_task_id  was nil.  Would eliminate the need for a helper method