Sha256: 54723baee7f44bb9a2f583e92de1307acd66e06194def6e7c27b12bc11d7fd23
Contents?: true
Size: 567 Bytes
Versions: 2
Compression:
Stored size: 567 Bytes
Contents
class UsersController < ApplicationController before_filter :authenticate, only: 'index' before_filter :authenticate_with_admin, 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 session[:target_page] || safe_root_url, notice: t('authentication.signup_confirmation') session[:target_page] = nil else render "new" end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
tkh_authentication-0.0.8 | app/controllers/users_controller.rb |
tkh_authentication-0.0.7 | app/controllers/users_controller.rb |