Sha256: f43544abe85c454191efc74c7fecd29ead23f78b07d4421368260ed84314cc41

Contents?: true

Size: 701 Bytes

Versions: 8

Compression:

Stored size: 701 Bytes

Contents

class UsersController < ApplicationController
  prepend_before_filter :current_user, only: :exhibit
  before_filter :authenticate_user!, except: [:accept, :exhibit]
  respond_to :html, :xml

  def index
    user_session[:cart] = "Cart"
    respond_with(current_user)
  end

  def edit_form
    user_session['last_request_at'] = 31.minutes.ago.utc
  end

  def update_form
    render text: 'Update'
  end

  def accept
    @current_user = current_user
  end

  def exhibit
    render text: current_user ? "User is authenticated" : "User is not authenticated"
  end

  def expire
    user_session['last_request_at'] = 31.minutes.ago.utc
    render text: 'User will be expired on next request'
  end
end

Version data entries

8 entries across 8 versions & 2 rubygems

Version Path
devbootsrap-0.0.7 test/rails_app/app/controllers/users_controller.rb
devbootsrap-0.0.6 test/rails_app/app/controllers/users_controller.rb
devbootsrap-0.0.5 test/rails_app/app/controllers/users_controller.rb
devbootsrap-0.0.4 test/rails_app/app/controllers/users_controller.rb
devbootsrap-0.0.3 test/rails_app/app/controllers/users_controller.rb
devbootsrap-0.0.2 test/rails_app/app/controllers/users_controller.rb
devbootsrap-0.0.1 test/rails_app/app/controllers/users_controller.rb
devise-3.2.4 test/rails_app/app/controllers/users_controller.rb