Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mastropinguino/conditionizr-rails
A gem to automate use of conditionizr with rails 3
https://github.com/mastropinguino/conditionizr-rails
Last synced: about 1 month ago
JSON representation
A gem to automate use of conditionizr with rails 3
- Host: GitHub
- URL: https://github.com/mastropinguino/conditionizr-rails
- Owner: mastropinguino
- Created: 2013-04-24T09:43:45.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2013-04-24T10:44:17.000Z (over 11 years ago)
- Last Synced: 2023-03-12T04:42:19.207Z (almost 2 years ago)
- Language: Ruby
- Size: 102 KB
- Stars: 0
- Watchers: 1
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
conditionizr-rails
==================The conditionizr-rails gem will include the [Conditionizr.js](https://github.com/conditionizr/conditionizr/) library into your `Rails 3.1+` app via the asset pipeline.
## Installation
Add the following to your `assets` group in your Gemfile:```ruby
group :assets do
gem 'conditionizr-rails'
end
```## Usage
Conditionizr should be added to the `` of your HTML. Be sure to check out the [offical docs](http://conditionizr.com/docs.html) about **Installing Conditionizr** for more info.
Include it using the helper like so `<%= javascript_include_tag :conditionizr %>`, Rails will take care of the compilation and minification automatically for you.Example of your `app/views/layouts/application.html.erb`:
```erb
Your App
<%= stylesheet_link_tag :application, media: :all %>
<%= javascript_include_tag :conditionizr %>
<%= csrf_meta_tags %>...
<%= javascript_include_tag :application %>```