Module: Users

Included in:
RJR
Defined in:
lib/users/common.rb,
lib/users/user.rb,
lib/users/role.rb,
lib/users/session.rb,
lib/users/registry.rb,
lib/users/privilege.rb,
lib/users/attribute.rb,
lib/users/email_helper.rb,
lib/users/attributes/own.rb,
lib/users/attributes/stats.rb,
lib/users/attributes/other.rb,
lib/users/attributes/interact.rb,
lib/users/events/registered_user.rb

Overview

Users module other attributes

Copyright (C) 2013 Mohammed Morsi <[email protected]> Licensed under the AGPLv3+ www.gnu.org/licenses/agpl.txt

Defined Under Namespace

Modules: Attributes, Events, RJR Classes: Attribute, AttributeClass, EmailHelper, Privilege, Registry, Role, Session, User

Class Method Summary collapse

Class Method Details

.random_string(length) ⇒ Object

Generate and return a random string of the specified length


13
14
15
# File 'lib/users/common.rb', line 13

def self.random_string(length)
  (0...length).map{65.+(rand(25)).chr}.join
end