diff options
author | Robert Speicher <rspeicher@gmail.com> | 2015-08-26 11:30:38 -0700 |
---|---|---|
committer | Robert Speicher <rspeicher@gmail.com> | 2015-08-26 11:30:38 -0700 |
commit | 2d72efcd9fb63f4bb0c6aed5a472a2eca2d6abac (patch) | |
tree | 7dc1151c1fe836130e6953de359f1cbd7606c501 /lib/gitlab/themes.rb | |
parent | 6d43308b5a5ff7663e1782fd6f5493f48c0f7e2a (diff) | |
download | gitlab-ce-2d72efcd9fb63f4bb0c6aed5a472a2eca2d6abac.tar.gz |
Add `count` to Themes and ColorSchemes
Diffstat (limited to 'lib/gitlab/themes.rb')
-rw-r--r-- | lib/gitlab/themes.rb | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/gitlab/themes.rb b/lib/gitlab/themes.rb index 37a36b9599b..83f91de810c 100644 --- a/lib/gitlab/themes.rb +++ b/lib/gitlab/themes.rb @@ -37,6 +37,11 @@ module Gitlab THEMES.detect { |t| t.id == id } || default end + # Returns the number of defined Themes + def self.count + THEMES.size + end + # Get the default Theme # # Returns a Theme |