Sha256: 86d0e7faa5ce0f56bfae34253201670a2f82784175ade41f63d20f94c322ee3e
Contents?: true
Size: 622 Bytes
Versions: 2
Compression:
Stored size: 622 Bytes
Contents
module Typus module Orm module ActiveRecord module User module ClassMethods def generate(*args) options = args.extract_options! options[:password] ||= Typus.password options[:role] ||= Typus.master_role options[:status] = true user = new(options, :without_protection => true) user.save ? user : false end def roles Typus::Configuration.roles.keys.sort end def locales Typus::I18n.available_locales end end end end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
typus-3.1.10 | lib/typus/orm/active_record/user/class_methods.rb |
typus-3.1.9 | lib/typus/orm/active_record/user/class_methods.rb |