Rimuove link al portale Stripe in area cliente, aggiunge flusso admin per PDF fattura e email, blocca checkout senza dati di fatturazione, allinea prezzi a €4,90/€39,90 e €9,90/€69,90, locale italiano e documentazione deploy. Co-authored-by: Cursor <cursoragent@cursor.com>
29 lines
550 B
Ruby
29 lines
550 B
Ruby
module Public
|
|
class SiteBaseController < ActionController::Base
|
|
layout "marketing"
|
|
|
|
include ::SeoHelper
|
|
include ::LegalHelper
|
|
helper ApplicationHelper
|
|
helper_method :current_user, :logged_in?
|
|
|
|
before_action :set_site_locale
|
|
|
|
private
|
|
|
|
def set_site_locale
|
|
I18n.locale = :it
|
|
end
|
|
|
|
def current_user
|
|
return @current_user if defined?(@current_user)
|
|
|
|
@current_user = User.find_by(id: session[:user_id]) if session[:user_id]
|
|
end
|
|
|
|
def logged_in?
|
|
current_user.present?
|
|
end
|
|
end
|
|
end
|