Commit ededa989 authored by Marin Jankovski's avatar Marin Jankovski

Shorter check in services controller.

parent 0da59cb5
...@@ -17,7 +17,7 @@ class Projects::ServicesController < Projects::ApplicationController ...@@ -17,7 +17,7 @@ class Projects::ServicesController < Projects::ApplicationController
def update def update
if @service.update_attributes(service_params) 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) @project.update_attributes(issues_tracker: @service.to_param)
end end
redirect_to edit_project_service_path(@project, @service.to_param), redirect_to edit_project_service_path(@project, @service.to_param),
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment