title: How can I route a mobile root differently than a non-mobile one in Rails?
body: <p>I am building a small website in Ruby on Rails and using jQuery Mobile for mobile-friendly views.</p>
  
  <p>When you view the site through a desktop browser, the root points to a specific page (let's call it "home-page") so that the URLs index looks like this: example.com/pages/home-page.</p>
  
  <p>A mobile user can click a link start a mobile session, but when that happens, instead of getting a mobile version of example.com/pages/home-page, I want the mobile user to redirect to example.com/pages (which, of course, is pages#index) to work correctly with my mobile views.</p>
  
  <p>Any pointers on how to accomplish this? Is there some sort of conditional I need to pass in my routes? Links to other resources on the web is fine also. I've tried searching but haven't found quite the answer I'm looking for.</p>
  
  <p>Thanks in advance; you all are great.</p>