Skip to content
Snippets Groups Projects
Commit f5c9a409 authored by Lin Jen-Shin's avatar Lin Jen-Shin
Browse files

Simplify the code

parent 1bd2327c
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -26,14 +26,10 @@ class Admin::ServicesController < Admin::ApplicationController
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
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment