Module: RushJobMongoid::SettingsHelper

Included in:
ApplicationHelper, DashboardController
Defined in:
app/helpers/rush_job_mongoid/settings_helper.rb

Instance Method Summary collapse

Instance Method Details

#current_themeObject



3
4
5
# File 'app/helpers/rush_job_mongoid/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_mongoid/settings_helper.rb', line 11

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

#invert_themeObject



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

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

#queue_groups_enabled?Boolean

Returns:

  • (Boolean)


15
16
17
# File 'app/helpers/rush_job_mongoid/settings_helper.rb', line 15

def queue_groups_enabled?
  cookies[:rush_job_queue_groups_presenter] != 'disabled'
end