module User::Authorization

Public Instance Methods

role_is?(string) click to toggle source
# File lib/generators/hello/install/templates/models/concerns/user/authorization.rb, line 3
def role_is?(string)
  case string.to_s
  when 'guest'
    %w(guest).include?(role)
  when 'onboarding'
    %w(onboarding).include?(role)
  when 'user'
    %w(user webmaster).include?(role)
  when 'webmaster'
    %w(webmaster).include?(role)
  end
end