mirror of
https://github.com/Retrospring/retrospring.git
synced 2025-03-31 18:42:12 +02:00
Fix get_active_theme to return proper theme for user
This commit is contained in:
parent
b7b2adde44
commit
d9f67e86d9
1 changed files with 8 additions and 4 deletions
|
@ -47,14 +47,18 @@ module ThemeHelper
|
||||||
end
|
end
|
||||||
|
|
||||||
def get_active_theme
|
def get_active_theme
|
||||||
if current_user&.theme
|
if @user&.theme
|
||||||
current_user.theme
|
|
||||||
elsif @user&.theme
|
|
||||||
if user_signed_in?
|
if user_signed_in?
|
||||||
@user.theme unless !current_user&.show_foreign_themes?
|
if current_user&.show_foreign_themes?
|
||||||
|
@user.theme
|
||||||
|
else
|
||||||
|
current_user&.theme
|
||||||
|
end
|
||||||
else
|
else
|
||||||
@user.theme
|
@user.theme
|
||||||
end
|
end
|
||||||
|
elsif current_user&.theme
|
||||||
|
current_user.theme
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue