Skip to content

How To: Define a different root route for logged in out users

Andrew Havens edited this page Jun 1, 2015 · 1 revision

This works in Rails 4.

Rails.application.routes.draw do
  devise_for :users

  authenticated :user do
    root 'secret#index', as: :authenticated_root
  end

  root "home#index"
end

Clone this wiki locally