Class: Admin::Kitsune::SessionsController

Inherits:
KitsuneController
  • Object
show all
Defined in:
app/controllers/admin/kitsune/sessions_controller.rb

Instance Method Summary collapse

Instance Method Details

#createObject



8
9
10
11
12
13
14
15
16
17
# File 'app/controllers/admin/kitsune/sessions_controller.rb', line 8

def create
  @user = KitsuneUser.authenticate(params[:session][:email], params[:session][:password])
  if @user.nil?
    flash[:notice] = "Could not log you in"
    render 'new'
  else
    (@user)
    redirect_back_or(url_for(:controller => 'admin/kitsune/models'))
  end
end

#destroyObject



19
20
21
22
# File 'app/controllers/admin/kitsune/sessions_controller.rb', line 19

def destroy
  sign_out
  redirect_to(url_for(:controller => 'admin/kitsune/models'))
end

#newObject



4
5
6
# File 'app/controllers/admin/kitsune/sessions_controller.rb', line 4

def new
  
end