From 4e299d812670955ed61831a78c3bdb189306bfc9 Mon Sep 17 00:00:00 2001 From: Nicolas Bally Date: Thu, 2 May 2019 10:33:39 +0200 Subject: [PATCH] suite --- app/models/contact.rb | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/app/models/contact.rb b/app/models/contact.rb index 1cb7a13..ad5ba6a 100644 --- a/app/models/contact.rb +++ b/app/models/contact.rb @@ -59,9 +59,12 @@ class Contact < ActiveRecord::Base :provenance_id => self.provenance_id } - #api_url = "https://groupe-payre.fr/admin/contacts/api" - api_url ="http://localhost:3030/admin/contacts/api" - + if Rails.env.development? + api_url ="http://localhost:3030/admin/contacts/api" + else + api_url = "https://groupe-payre.fr/admin/contacts/api" + end + @c = Curl::Easy.new(api_url) do |curl| curl.verbose = true end