Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

https://github.com/peresleguine/pluggable_js

Page-specific javascript for Rails applications with the ability of passing data.
https://github.com/peresleguine/pluggable_js

Last synced: about 2 months ago
JSON representation

Page-specific javascript for Rails applications with the ability of passing data.

Lists

README

        

# PluggableJs

[![Build Status](https://travis-ci.org/peresleguine/pluggable_js.svg?branch=master)](https://travis-ci.org/peresleguine/pluggable_js) [![Gem Version](https://badge.fury.io/rb/pluggable_js.svg)](http://badge.fury.io/rb/pluggable_js)

This gem provides simple functionality of loading page specific javascript and allows to pass data from a controller. It requires only Rails >= 3.1 with asset pipeline enabled. Keep desired js code in controller related files as action based functions. They will be triggered only when matching controller and action parameters and when DOM is ready.

## Installation

1. Add `gem 'pluggable_js', '~> 2.2.0'` to Gemfile and run `bundle` command to install it
2. Add `<%= javascript_pluggable_tag %>` helper to application layout file above the closing `