Skip to content

Instantly share code, notes, and snippets.

@auscaster
auscaster / UsersController.rb
Created May 11, 2014 08:15
UsersController using Devise and CanCan
# Used in http://sourcey.com/rails-4-omniauth-using-devise-with-twitter-facebook-and-linkedin
# This class also uses CanCan to protect user object access
class UsersController < ApplicationController
before_action :set_user, only: [:show, :edit, :update, :destroy]
# GET /users
# GET /users.json
def index
@users = User.all
end