I'm looking for a way to separate the sidebar between admin and user.

        if admin == true
        <% = render partial:'layouts/shared/admin_leftnav'%>
        else else
        <% = render partial:'layouts/shared/leftnav'%>

I want to do something like

Corresponding source code application.html.erb
<! DOCTYPE html>
  <% = csrf_meta_tags%>
  <meta http-equiv = "Content-Type" content = "text/html;charset = UTF-8">
  <!-Meta, title, CSS, favicons, etc.->
  <meta charset = "utf-8">
  <meta http-equiv = "X-UA-Compatible" content = "IE = edge">
  <meta name = "viewport" content = "width = device-width, initial-scale = 1">
  <% = stylesheet_link_tag'application', media:'all'%>
  <title><% = yield: title%></title>
      <% = render partial:'layouts/shared/leftnav'%>
    <% = yield%>
    <% = render partial:'layouts/shared/footer'%>
  <% = javascript_include_tag'application'%>
What I tried

I also thought about how to create admin_application.html.erb for admin in my controller, but I want to avoid it because it is not very smart.

class AdminController
Supplementary information (FW/tool version, etc.)

Please provide more detailed information here.