Sha256: f6dd720274635355dbb60ee85c7cc291fc6568db22c6b6b67d8f2f1e84531e24

Contents?: true

Size: 523 Bytes

Versions: 215

Compression:

Stored size: 523 Bytes

Contents

module InviteOnlySupport
  extend ActiveSupport::Concern

  def invitation
    return not_found unless invitation_only?
    return not_found unless params[:key].present?
    return not_found unless invitation_keys.include?(params[:key])
    session[:invitation_key] = params[:key]
    if user_signed_in?
      redirect_to new_account_team_path
    else
      redirect_to new_user_registration_path
    end
  end

  def not_found
    render file: "#{Rails.root}/public/404.html", layout: false, status: :not_found
  end
end

Version data entries

215 entries across 215 versions & 1 rubygems

Version Path
bullet_train-1.7.18 app/controllers/concerns/invite_only_support.rb
bullet_train-1.7.17 app/controllers/concerns/invite_only_support.rb
bullet_train-1.7.16 app/controllers/concerns/invite_only_support.rb
bullet_train-1.7.15 app/controllers/concerns/invite_only_support.rb
bullet_train-1.7.14 app/controllers/concerns/invite_only_support.rb
bullet_train-1.7.13 app/controllers/concerns/invite_only_support.rb
bullet_train-1.7.12 app/controllers/concerns/invite_only_support.rb
bullet_train-1.7.11 app/controllers/concerns/invite_only_support.rb
bullet_train-1.7.10 app/controllers/concerns/invite_only_support.rb
bullet_train-1.7.9 app/controllers/concerns/invite_only_support.rb
bullet_train-1.7.3 app/controllers/concerns/invite_only_support.rb
bullet_train-1.7.2 app/controllers/concerns/invite_only_support.rb
bullet_train-1.7.1 app/controllers/concerns/invite_only_support.rb
bullet_train-1.7.0 app/controllers/concerns/invite_only_support.rb
bullet_train-1.6.38 app/controllers/concerns/invite_only_support.rb
bullet_train-1.6.37 app/controllers/concerns/invite_only_support.rb
bullet_train-1.6.36 app/controllers/concerns/invite_only_support.rb
bullet_train-1.6.35 app/controllers/concerns/invite_only_support.rb
bullet_train-1.6.34 app/controllers/concerns/invite_only_support.rb
bullet_train-1.6.33 app/controllers/concerns/invite_only_support.rb