diff options
Diffstat (limited to 'app/models/user_preference.rb')
-rw-r--r-- | app/models/user_preference.rb | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/app/models/user_preference.rb b/app/models/user_preference.rb index d55b8ac58..7cb9b0ca6 100644 --- a/app/models/user_preference.rb +++ b/app/models/user_preference.rb @@ -32,7 +32,8 @@ class UserPreference < ActiveRecord::Base 'comments_sorting', 'warn_on_leaving_unsaved', 'no_self_notified', - 'textarea_font' + 'textarea_font', + 'recently_used_projects' TEXTAREA_FONT_OPTIONS = ['monospace', 'proportional'] @@ -90,6 +91,9 @@ class UserPreference < ActiveRecord::Base def textarea_font; self[:textarea_font] end def textarea_font=(value); self[:textarea_font]=value; end + def recently_used_projects; (self[:recently_used_projects] || 3).to_i; end + def recently_used_projects=(value); self[:recently_used_projects] = value.to_i; end + # Returns the names of groups that are displayed on user's page # Example: # preferences.my_page_groups |