Inline JS for Rails

Build Status

Inline JS can be used to include JavaScript files in your views in a minified format.

Installation

You can install Inline JS for Rails using the following command:

$ gem install ijs-rails

Or, by adding the following to your Gemfile:

gem 'ijs-rails', '~> 0.1'

Usage

Let's start with an example script hello.js which should be saved in the app/javascript/inline directory.

//
// Example Script
//

alert('Hello, World!');

Next in a view, use the render_ijs method to render a