Sha256: e5aa27ca7792ffc69c3306a257a3c13981b0fb79cd7dd6ead526bfee5a5d3886

Contents?: true

Size: 274 Bytes

Versions: 7

Compression:

Stored size: 274 Bytes

Contents

class UsersController < ApplicationController
  before_action :authenticate_user!

  def index
    @users = User.all
  end

  def show
    @user = User.find(params[:id])
    unless @user == current_user
      redirect_to :back, :alert => "Access denied."
    end
  end

end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
rails_apps_pages-0.6.6 lib/generators/pages/users/templates/devise/users_controller.rb
rails_apps_pages-0.6.5 lib/generators/pages/users/templates/devise/users_controller.rb
rails_apps_pages-0.6.4 lib/generators/pages/users/templates/devise/users_controller.rb
rails_apps_pages-0.6.3 lib/generators/pages/users/templates/devise/users_controller.rb
rails_apps_pages-0.6.2 lib/generators/pages/users/templates/devise/users_controller.rb
rails_apps_pages-0.6.0 lib/generators/pages/users/templates/devise/users_controller.rb
rails_apps_pages-0.5.16 lib/generators/pages/users/templates/devise/users_controller.rb