ruby on rails - Turn off part of Application Layout with devise -
i've created side menu in layout application don't wanna show on sign in page, wanna see rest of layout application .
this part don't wanna show in sign in page.
<% if is_a?(devise::sessionscontroller) %> <div class="col-sm-3" style = "position: relative;"> <!-- left --> <h3><i class="glyphicon glyphicon-list"></i> menu</h3> <hr> <ul class="nav nav-stacked"> <li><a href="javascript:;"><i class="glyphicon glyphicon-search"></i> pesquisar</a></li> <li><a href="javascript:;"><i class="glyphicon glyphicon-link"></i> links</a></li> <li><a href="javascript:;"><i class="glyphicon glyphicon-list-alt"></i> reports</a></li> <li><a href="javascript:;"><i class="glyphicon glyphicon-book"></i> books</a></li> <li><a href="javascript:;"><i class="glyphicon glyphicon-briefcase"></i> tools</a></li> <li><a href="javascript:;"><i class="glyphicon glyphicon-time"></i> real-time</a></li> <li><a href="javascript:;"><i class="glyphicon glyphicons-heart"></i> advanced..</a></li> </ul> <hr> </div><!-- /span-3 -->
but command shutoff part of code in of pages, how specify users/sign_in page?
if understood correctly, want show part logged-in users. is, do:
in controller there should current_user. replace
<% if is_a?(devise::sessionscontroller) %>
with
<% if !current_user %>
basically should done in controller , right view chosen. might now.
Comments
Post a Comment