Module: ThemesHelper

Defined in:
lib/thredded_create_app/tasks/setup_app_skeleton/themes_helper.rb

Instance Method Summary collapse

Instance Method Details

#current_themeObject



11
12
13
14
# File 'lib/thredded_create_app/tasks/setup_app_skeleton/themes_helper.rb', line 11

def current_theme
  cookie_theme = cookies['app-theme']
  themes.key?(cookie_theme) ? cookie_theme : themes.keys.first
end

#themesObject



4
5
6
7
8
9
# File 'lib/thredded_create_app/tasks/setup_app_skeleton/themes_helper.rb', line 4

def themes
  {
    'day' => t('themes.day'),
    'night' => t('themes.night')
  }
end