Shorter check in services controller.

This commit is contained in:
Marin Jankovski 2015-01-26 22:46:54 -08:00
parent 0da59cb55b
commit ededa98995
1 changed files with 1 additions and 1 deletions

View File

@ -17,7 +17,7 @@ class Projects::ServicesController < Projects::ApplicationController
def update
if @service.update_attributes(service_params)
if @service.activated? && @service.category == :issue_tracker
if @service.activated? && @service.issue_tracker?
@project.update_attributes(issues_tracker: @service.to_param)
end
redirect_to edit_project_service_path(@project, @service.to_param),