send works on strings

This commit is contained in:
Lin Jen-Shin 2016-09-01 02:17:20 +08:00
parent 11dd99d5d3
commit e83149d5ed

View file

@ -710,7 +710,7 @@ class Project < ActiveRecord::Base
if template.nil?
# If no template, we should create an instance. Ex `create_gitlab_ci_service`
self.send :"create_#{service_name}_service"
send("create_#{service_name}_service")
else
Service.create_from_template(self.id, template)
end