diff options
author | Robert Speicher <rspeicher@gmail.com> | 2017-09-19 21:22:43 +0300 |
---|---|---|
committer | Robert Speicher <rspeicher@gmail.com> | 2017-12-20 00:45:08 +0300 |
commit | 2f92238a6ea5550f94a4ece8453cbf6bdee1f77d (patch) | |
tree | 0fd399f271e79ff4375efb2d3a206b4327fdcbd1 /app/views/shared/boards | |
parent | 6f1df8dfaabfebeb5e9ffbd785f263314b817324 (diff) |
Use UserSerializer instead of `User.to_json`
Diffstat (limited to 'app/views/shared/boards')
-rw-r--r-- | app/views/shared/boards/components/_sidebar.html.haml | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/app/views/shared/boards/components/_sidebar.html.haml b/app/views/shared/boards/components/_sidebar.html.haml index b3f73e96b81..8e5e32e9f16 100644 --- a/app/views/shared/boards/components/_sidebar.html.haml +++ b/app/views/shared/boards/components/_sidebar.html.haml @@ -1,5 +1,4 @@ -%board-sidebar{ "inline-template" => true, - ":current-user" => "#{current_user ? current_user.to_json(only: [:username, :id, :name], methods: [:avatar_url]) : {}}" } +%board-sidebar{ "inline-template" => true, ":current-user" => (UserSerializer.new.represent(current_user) || {}).to_json } %transition{ name: "boards-sidebar-slide" } %aside.right-sidebar.right-sidebar-expanded.issue-boards-sidebar{ "v-show" => "showSidebar" } .issuable-sidebar |