Rails with activeadmin and devise - signed_in? -


i have installed devise , activeadmin. when login activeadmin rails thinks im signed_in user on page no current_user value. when go on pages without login user (with logged on activeadmin) statement:

<% if signed_in? %>  

is true , rails try run script in it. how can tell rails activeadmin users isnt current_user whole site?

you should tell signed_in? method user at:

on regular user pages not want considered signed in when you're signed in admin, may want replace

    <% if signed_in? %>  

by

    <% if user_signed_in? %>  

where user name of devise resource (if have named differently, replace user actual name (ex: if devise user model enduser, should put end_user_signed_in?)


Comments

Popular posts from this blog

java - Run a .jar on Heroku -

java - Jtable duplicate Rows -

validation - How to pass paramaters like unix into windows batch file -