Module: RushJob::SettingsHelper

Included in:
ApplicationHelper
Defined in:
app/helpers/rush_job/settings_helper.rb

Instance Method Summary collapse

Instance Method Details

#current_themeObject



3
4
5
# File 'app/helpers/rush_job/settings_helper.rb', line 3

def current_theme
  cookies[:rush_job_theme] == 'dark' ? 'dark' : 'light'
end

#editing_enabled?Boolean

Returns:

  • (Boolean)


11
12
13
# File 'app/helpers/rush_job/settings_helper.rb', line 11

def editing_enabled?
  cookies[:rush_job_editing] == 'enabled'
end

#invert_themeObject



7
8
9
# File 'app/helpers/rush_job/settings_helper.rb', line 7

def invert_theme
  cookies[:rush_job_theme] == 'dark' ? 'light' : 'dark'
end