Skip to content
This repository has been archived by the owner on Mar 7, 2018. It is now read-only.

How To: Change the default dashboard

latentflip edited this page Nov 1, 2012 · 1 revision

Out of the box, the default dashboard is picked simply as the first one alphabetically.

You can override this by changing the sinatra setting :default_dashboard. This is easily done in the config.ru in your app's directory like so:

...

configure do
  set :auth_token, 'AUTH_TOKEN'
  set :default_dashboard, 'my_favourite_dashboard' #<==== set default dashboard like this

  helpers do

    def protected!
      redirect('/auth/g') unless session[:user_id]
    end

...