Sha256: 6b1d15bbba3e12b140a514fc518f1ab4d1ef78c3670cc795f9052114beb71e4d
Contents?: true
Size: 232 Bytes
Versions: 2
Compression:
Stored size: 232 Bytes
Contents
class User < ActiveRecord::Base include Roles::ActiveRecord strategy :one_role valid_roles_are :admin, :guest, :user def initialize attributes = {} super # add_role default_role set_default_role end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
roles_active_record-0.5.1 | spec/fixtures/one_role_setup.rb |
roles_active_record-0.5.0 | spec/fixtures/one_role_setup.rb |