Skip to content

Commit

Permalink
Rubocop fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Moises Deniz committed Jan 18, 2024
1 parent bbb5569 commit ab1b51e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions src/api/app/helpers/webui/webui_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -328,8 +328,9 @@ def valid_xml_id(rawid)
end

def theme_from_user
return "light" unless feature_enabled?("color_themes")
User.session&.color_theme || "system"
return 'light' unless feature_enabled?('color_themes')

User.session&.color_theme || 'system'
end
end

Expand Down
2 changes: 1 addition & 1 deletion src/api/app/models/user.rb
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ class User < ApplicationRecord
validates :password, confirmation: true, allow_blank: true
validates :biography, length: { maximum: MAX_BIOGRAPHY_LENGTH_ALLOWED }
validates :rss_secret, uniqueness: true, length: { maximum: 200 }, allow_blank: true
validates :color_theme, inclusion: { in: color_themes.keys }, if: -> { Flipper.enabled?("color_themes") }
validates :color_theme, inclusion: { in: color_themes.keys }, if: -> { Flipper.enabled?('color_themes') }

after_create :create_home_project, :measure_create
after_update :measure_delete
Expand Down

0 comments on commit ab1b51e

Please sign in to comment.