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.
- Host: GitHub
- URL: https://github.com/peresleguine/pluggable_js
- Owner: peresleguine
- License: mit
- Created: 2013-07-19T11:59:42.000Z (almost 11 years ago)
- Default Branch: master
- Last Pushed: 2016-01-10T12:13:44.000Z (over 8 years ago)
- Last Synced: 2024-04-01T15:24:04.369Z (3 months ago)
- Language: Ruby
- Homepage:
- Size: 90.8 KB
- Stars: 53
- Watchers: 3
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Lists
- awesome-ruby - PluggableJs - Page-specific javascript for Rails applications with the ability of passing data from a controller. (View helpers)
- awesome-ruby - PluggableJs - Page-specific javascript for Rails applications with the ability of passing data from a controller. (View helpers)
- awesome-ruby - PluggableJs - Page-specific javascript for Rails applications with the ability of passing data from a controller. (View helpers)
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 `