Make a user available for the user variable

This commit is contained in:
Jacob Schatz 2016-04-16 09:28:04 -04:00
parent 737087f7e5
commit ffd2416c56
2 changed files with 12 additions and 6 deletions

View File

@ -51,6 +51,12 @@ class HelpController < ApplicationController
end
def ui
# this will work on gitlab.com
@some_user = User.find_by(username: 'dzaporozhets')
if @some_user.nil?
# this will work in dev
@some_user = User.find(1)
end
end
private

View File

@ -345,11 +345,11 @@
%ul
%li
%a.dropdown-menu-user-link.is-active{href: "#"}
= link_to_member_avatar(current_user, size: 30)
= link_to_member_avatar(@some_user, size: 30)
%strong.dropdown-menu-user-full-name
= current_user.name
= @some_user.name
.dropdown-menu-user-username
= current_user.to_reference
= @some_user.to_reference
.example
%div
@ -372,11 +372,11 @@
%ul
%li
%a.dropdown-menu-user-link.is-active{href: "#"}
= link_to_member_avatar(current_user, size: 30)
= link_to_member_avatar(@some_user, size: 30)
%strong.dropdown-menu-user-full-name
= current_user.name
= @some_user.name
.dropdown-menu-user-username
= current_user.to_reference
= @some_user.to_reference
.dropdown-page-two
.dropdown-title
%button.dropdown-title-button.dropdown-menu-back{aria: {label: "Go back"}}