class Role include Mongoid::Document field :key, type: String field :title, type: String, localize: true field :built_in, type: Boolean, :default => false field :disabled, :type => Boolean, :default => false has_and_belongs_to_many :member_profiles has_many :authorizations embeds_many :role_fields def is_built_in? self.built_in end def is_disabled? self.disabled end end