Sha256: 6affda4d404893ba3e4df236af238a71020dcf7e8dc9bcac4168dbca505f6951

Contents?: true

Size: 411 Bytes

Versions: 10

Compression:

Stored size: 411 Bytes

Contents

class SessionsController < ApplicationController
  def signin
    session[:admin] = true
    redirect_to root_url, :notice => "Successfully signed in as admin"
  end

  def signout
    session[:admin] = false
    redirect_to root_url, :notice => "Successfully signed out"
  end

  def count
    session[:count] ||= 0
    if request.post?
      session[:count] += 1
    end
    render :layout => false
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
ajax_pagination-0.6.5 spec/rails_app/app/controllers/sessions_controller.rb
ajax_pagination-0.6.4 spec/rails_app/app/controllers/sessions_controller.rb
ajax_pagination-0.6.3 spec/rails_app/app/controllers/sessions_controller.rb
ajax_pagination-0.6.2 spec/rails_app/app/controllers/sessions_controller.rb
ajax_pagination-0.6.1 spec/rails_app/app/controllers/sessions_controller.rb
ajax_pagination-0.6.0 spec/rails_app/app/controllers/sessions_controller.rb
ajax_pagination-0.5.1 spec/rails_app/app/controllers/sessions_controller.rb
ajax_pagination-0.5.0 spec/rails_app/app/controllers/sessions_controller.rb
ajax_pagination-0.4.0 spec/rails_app/app/controllers/sessions_controller.rb
ajax_pagination-0.3.0 spec/rails_app/app/controllers/sessions_controller.rb