Sha256: efea823e7095a2a6f93d73cd3b8a393e23eaa35d889bc6c44f67c45e5d989fed
Contents?: true
Size: 562 Bytes
Versions: 1
Compression:
Stored size: 562 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] || root_url, notice: t('authentication.signup_confirmation') session[:target_page] = nil else render "new" end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
tkh_authentication-0.0.6 | app/controllers/users_controller.rb |