Class PrefsProfile
In: app/models/prefs_profile.rb
Parent: ActiveRecord::Base

A PrefsProfile contains the preferences of the User.

Methods

Attributes

peer_group  [RW]  (the peer_group-attributes can be modified via quick-settings, but will never be saved…)

Public Class methods

Class methods

[Source]

    # File app/models/prefs_profile.rb, line 52
52:   def self.use_default
53:     PrefsProfile.current_prefs = PrefsProfile.new(:default_settings => true)
54:   end

Public Instance methods

Creates a prefs-profile with default settings.

[Source]

    # File app/models/prefs_profile.rb, line 60
60:   def default_settings=(give_default_settings)
61:     if give_default_settings
62:       self.name = UserGroup.public.name
63:       self.user_group = UserGroup.public
64:       self.default_peer_group = PeerGroup.public
65:     end
66:   end

Protected Instance methods

Sets default values on login.

[Source]

    # File app/models/prefs_profile.rb, line 74
74:   def after_initialize
75:     @peer_group = self.default_peer_group
76:     return true
77:   end

[Validate]