Search code examples
ruby-on-railsruby-on-rails-3.2jqtouch

how to make ruby on rails application all mobiles compatible


i want to make my test app running on rails 3.2 and ruby 1.9.3 mobile compatable so that it can work on every mobile+ on desktop as well.so do i need to check/include every user agent such iphone/webos etc or is there any other way....OR just make my app compatible with mobile using jqtouch and everything will work fine irrespective of mobile device??


Solution

  • Its your personal choice:

    1. use a css framework such as zurb,bootstrap and smartly use their classes such as col-lg-12(for desktops),col-md-12(for ipads),col-sm-12(for small devices) and col-xs-12(for xtra small devices) to make your web app desktop/mobile/ipad compatible

    2. Or You can use jqtouch mentioned in ryan bates railscasts here to detect if a call is coming from a mobile using user-agent and then show mobile pages or else your default html.erb pages.But here you need to include a mobile page for every desktop for example : index.html.erb(for desktop) and index.mobile.erb(for mobile)

    its your choice.