If you haven't done so already I strongly recommend setting up some foundation HTML and CSS for your project:
When it comes to boilerplate, mobile is a special case. It's a complete different beast from the boilerplate above. So much so that for your mobile templates and views it's best to use something tailored specifically mobile. I use a mobile foundation based on Mobile Boilerplate...
A best practice baseline for your mobile web app
It is configured specifically for Rails. Feel free to use it, and here's how:
Clone the following base-mobile files from github, then copy and merge only the contents of the
base-mobile/mobile folder into your project at the root level.
git clone email@example.com:maxxiimo/base-mobile.git
Finally, add the following assets to the precompile list:
Rails.application.config.assets.precompile += %w( modernizr-2.8.3.min.js phone.css phone.js )
And that's that! With these few lines of code and this boilerplate your application can distinguish between device types and serve tailored code to those devices.
Want to know when the next article is published? Subscribe here. Thanks for reading!