Class: Athar::ThemesController
- Inherits:
-
ApplicationController
- Object
- ApplicationController
- ApplicationController
- Athar::ThemesController
- Defined in:
- app/controllers/athar/themes_controller.rb
Constant Summary collapse
- THEMES =
%w[dark light].freeze
Instance Method Summary collapse
Instance Method Details
#update ⇒ Object
7 8 9 10 11 12 13 14 |
# File 'app/controllers/athar/themes_controller.rb', line 7 def update theme = params[:theme].to_s return head :unprocessable_entity unless THEMES.include?(theme) .permanent[:athar_theme] = { value: theme, same_site: :lax } head :no_content end |