I am trying to setup role based routing in my application. Something
similar to the following:
map.root :controller => (authorize_admin? ? 'prospects' : 'welcome')
I am getting an error that authorize_admin? is not defined. It is
defined under lib directory and I can successfully call it from other
places in the application. How do you set up conditional root routes
for an application?