title: Rails: Different layouts based on different roles
body: <p>I have 3 different roles in my app: Guest, User, and Admin.  Certain pages need to have a different layout based on which role is viewing the page.  I was wondering if there's an easier way to do this than what I'm doing.</p>
  
  <p>For example, I currently have 3 different layouts.  And in my VenuesController I have 3 different actions below.  But it seems to me there should be a simpler way.</p>
  
  <pre><code>def index
    @venues = Venue.paginate(page: params[:page]).order("name ASC")
  end
  
  def admin_index
    @venues = Venue.paginate(page: params[:page]).order("name ASC")
    render layout: "admin"
  end
  
  def user_index
    @venues = Venue.paginate(page: params[:page]).order("name ASC")
    render layout: "user"
  end
  </code></pre>
  
  <p>I suppose I could have one <code>index</code> action and then inside it test what role my current_user has?</p>