From ad0d98e2d5a84dfd823655ef62d1834e46a1c5a5 Mon Sep 17 00:00:00 2001 From: Nicolas Bally Date: Fri, 9 Feb 2018 10:20:57 +0100 Subject: [PATCH] duree abo --- app/controllers/public/abonnements_controller.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/controllers/public/abonnements_controller.rb b/app/controllers/public/abonnements_controller.rb index fc27704..eee8d8b 100755 --- a/app/controllers/public/abonnements_controller.rb +++ b/app/controllers/public/abonnements_controller.rb @@ -6,11 +6,11 @@ class Public::AbonnementsController < ApplicationController layout "public" def new - @abonnement = current_customer.abonnements.new(:price => 300.0, :start_at => Time.now, :end_at => (Time.now+13.months).end_of_day, :slug => "negos-principal") + @abonnement = current_customer.abonnements.new(:price => 300.0, :start_at => Time.now, :end_at => (Time.now+14.months).end_of_day, :slug => "negos-principal") end def create - @abonnement = current_customer.abonnements.new(:price => 300.0, :start_at => Time.now, :end_at => (Time.now+13.months).end_of_day, :slug => "negos-principal") + @abonnement = current_customer.abonnements.new(:price => 300.0, :start_at => Time.now, :end_at => (Time.now+14.months).end_of_day, :slug => "negos-principal") if @abonnement.save session[:abonnement_id] = @abonnement