class ActionController::Base

Public Instance Methods

current_roles() click to toggle source

Write your own method to return the roles for current user

# File lib/generators/cant_cant_cant/install/templates/initializer.rb, line 35
def current_roles
  return [] unless defined? current_user
  return [] if current_user.empty?

  current_user.roles
end