Commit f5c9a409 authored by Lin Jen-Shin's avatar Lin Jen-Shin
Browse files

Simplify the code

parent 6f630ea9da0d
......@@ -26,14 +26,10 @@ def update
private
def services_templates
templates = []
Service.available_services_names.each do |service_name|
Service.available_services_names.map do |service_name|
service_template = service_name.concat("_service").camelize.constantize
templates << service_template.where(template: true).first_or_create
service_template.where(template: true).first_or_create
end
templates
end
def service
......
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