duree abo

This commit is contained in:
Nicolas Bally 2018-02-09 10:20:57 +01:00
parent 4b05510feb
commit ad0d98e2d5

View File

@ -6,11 +6,11 @@ class Public::AbonnementsController < ApplicationController
layout "public" layout "public"
def new 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 end
def create 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 if @abonnement.save
session[:abonnement_id] = @abonnement session[:abonnement_id] = @abonnement