<commit_before># jQuery Mobile for Rails

This gem adds the jQuery Mobile files to Rails' asset pipeline.

## Gem's jQuery Mobile Version

1.4.4 (gem 1.4.4)

## Installation

Add this gem to your Gemfile:

    gem 'jquery_mobile_rails'

This will add jQuery Mobile's javascripts, stylesheets and images to your app.

Include jquery.mobile (or jquery.mobile.min) in your `application.js` manifest:

    //= require jquery
    //= require jquery_ujs
    //= require jquery.mobile

And the same in your `application.css` manifest:

    *= require_self
    *= require_tree .
    *= require jquery.mobile

__NOTE:__ You should probably remove Turbolinks from your `application.js` manifest, as it likely won't work well with jQuery Mobile.

## Use

I built this gem for using with the Mobylette gem, but it will work with your standalone application, or with any other gem that filters your mobile requests.

Please refer to [jQuery Mobile's documentation](http://demos.jquerymobile.com/1.4.4/) for information on laying out your app and using all of the jQuery Mobile features.

## Example

There is a very simple application inside test/dummy demonstrating basic usage of jQuery Mobile templating.<commit_msg>Add note about precompiled assets<commit_after># jQuery Mobile for Rails

This gem adds the jQuery Mobile files to Rails' asset pipeline.

## Gem's jQuery Mobile Version

1.4.4 (gem 1.4.4)

## Installation

Add this gem to your Gemfile:

    gem 'jquery_mobile_rails'

This will add jQuery Mobile's javascripts, stylesheets and images to your app.

Include jquery.mobile (or jquery.mobile.min) in your `application.js` manifest:

    //= require jquery
    //= require jquery_ujs
    //= require jquery.mobile

And the same in your `application.css` manifest:

    *= require_self
    *= require_tree .
    *= require jquery.mobile

__NOTE:__ You should probably remove Turbolinks from your `application.js` manifest, as it likely won't work well with jQuery Mobile.

You'll also need to ensure that jQuery Mobile's PNG/GIF files are added to the asset pipeline, otherwise the images will not be precompiled and served in production (and in the latest Rails 4.1 release, you will also see errors in development).

    # In config/initializers/assets.rb
    Rails.application.config.assets.precompile += %w( jquery-mobile/icons-png/*.png jquery-mobile/*.gif )

## Use

I built this gem for using with the Mobylette gem, but it will work with your standalone application, or with any other gem that filters your mobile requests.

Please refer to [jQuery Mobile's documentation](http://demos.jquerymobile.com/1.4.4/) for information on laying out your app and using all of the jQuery Mobile features.

## Example

There is a very simple application inside test/dummy demonstrating basic usage of jQuery Mobile templating.
{'fraction_non_alphanumeric': 0.07152974504249292, 'fraction_numerical': 0.007082152974504249, 'mean_word_length': 3.9648506151142353, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6753864', 'n_tokens_mistral': 796, 'n_tokens_neox': 743, 'n_words': 358}