module PlataformaSocial def self.domains module_name domains = { :js => 'js', :analytics => 'analytics', :login => 'login', :events => 'events', :share => 'share', :comments => 'comments', :ranking => 'ranking', :badge => 'badge', :notification => 'notification' } if domains[module_name.to_sym].present? name = domains[module_name.to_sym] url = case Rails.env when "production" "https://#{name}.plataformasocial.com.br" when "development" "https://#{name}.dev.plataformasocial.com.br" when "test" "https://#{name}.dev.plataformasocial.com.br" when "staging" "https://#{name}.dev.plataformasocial.com.br" end url end end end