Sha256: f149fc51e633086d7e5fc742d9c0710213d354c7aaa3af4305edcf18add483db
Contents?: true
Size: 783 Bytes
Versions: 21
Compression:
Stored size: 783 Bytes
Contents
# frozen_string_literal: true module PaidUp # PaidUp Controller class PaidUpController < ApplicationController helper :all before_action :set_locale before_action :warn_if_delinquent private def set_locale I18n.locale = params[:locale] || I18n.default_locale end def warn_if_delinquent return unless delinquent? && params[:controller] != 'paid_up/subscriptions' flash[:error] = :account_is_delinquent.l + :to_disable_this_message_subscribe.l( subscribe_link: paid_up.plans_path ) end def delinquent? user_signed_in? && ( current_user.plan.nil? || current_user.stripe_data.delinquent ) end end end
Version data entries
21 entries across 21 versions & 1 rubygems