Show and hide based on user role in rails
问题 I have the following code in my home.html.erb file; <!-- if seeker is logged in show button "Grab it" --> <% if user_signed_in? %> <div class="grabit alignright"> <small>want to work on this?</small> <!-- if seeker is not logged in, show him the output text of "Sign in to work on this job" --> <% else %> <small>are you a guru? want to work on this? Sign up.</small> <% end %> </div> Now as you can see I'm trying to have Seeker as a user role. Depending if that type of user with that type of