Switch branches/tags
Nothing to show
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
22 lines (13 sloc) 745 Bytes

A gem to easily add mobile support to your Rails app!

To install

gem install jquery-mobile-rails

or in Gemfile

gem 'jquery-mobile-rails'


You will have access to a mobile? method in your controllers and layouts that will be true when a mobile devise visits the app. In your controller, add:

<% if mobile? %>
<%= stylesheet_link_tag "" %><%= javascript_include_tag "" %>
<% end %>

Note, you want to have your custom JS code included before the jQueryMobile JS file, so that it can fire the mobileinit hooks you set up (see