Class: Prelaunch::PrelaunchController

Inherits:
ActionController::Base
  • Object
show all
Defined in:
app/controllers/prelaunch/prelaunch_controller.rb

Instance Method Summary collapse

Instance Method Details

#indexObject



3
4
5
6
7
8
9
# File 'app/controllers/prelaunch/prelaunch_controller.rb', line 3

def index
  if Prelaunch.redirect_url
    redirect_to Prelaunch.redirect_url
  else
    render template: 'prelaunch/index'
  end
end

#logoutObject



21
22
23
24
25
26
27
# File 'app/controllers/prelaunch/prelaunch_controller.rb', line 21

def logout
  if Prelaunch::valid? session[:prelaunch_token]
    session[:prelaunch_token] = nil
  end

  redirect_to '/'
end

#redirectObject



11
12
13
# File 'app/controllers/prelaunch/prelaunch_controller.rb', line 11

def redirect
  redirect_to '/'
end

#verifyObject



15
16
17
18
19
# File 'app/controllers/prelaunch/prelaunch_controller.rb', line 15

def verify
  session[:prelaunch_token] = params[:token]

  redirect_to '/'
end