require 'service_locator' class SignupService < Service(:crm) puts "@@@@ Site Detail count #{SiteDetail.count}" site_type = SiteDetail.first.site_type unless SiteDetail.first.blank? if site_type && (site_type == "community" || site_type == "ccslocal" || site_type == "ccsmain") self.element_name = "ccslocal_site" self.collection_name = "ccslocal_sites" self.prefix = "/services/" else self.element_name = "site" self.collection_name = "sites" self.prefix = "/services/" end end