Sha256: 218bb9498876f9e11a0c05e3ba8a5aeac9102da5212303ff01bb67f7f036f719

Contents?: true

Size: 447 Bytes

Versions: 1

Compression:

Stored size: 447 Bytes

Contents

class UsersController < ApplicationController
  
  before_filter :authenticate, only: 'index'
  
  def index
    @users = User.by_recent
    render layout: 'admin'
  end

  def new
    @user = User.new
  end

  def create
    @user = User.new(params[:user])
    if @user.save
      cookies[:auth_token] = @user.auth_token
      redirect_to root_url, notice: t('authentication.signup_confirmation')
    else
      render "new"
    end
  end
  
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
tkh_authentication-0.0.2 app/controllers/users_controller.rb