Project

ijs-rails

0.0
Repository is archived
No release in over 3 years
Low commit activity in last 3 years
Inline JavaScript helper for Ruby on Rails.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 2.1
~> 13.0
~> 3.9
~> 0.80.0
~> 0.9.24

Runtime

 Project Readme

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 <script> tag containing the minified script:

<%= render_ijs 'hello' %>

Development

After checking out the repo, run bundle exec rake spec to run the tests.

To install this gem onto your machine, run bundle exec rake install.