Cascading Javascripts plugin

Plugin details

Allows you to define application-wide and page-specific javascript files without needing to manually include each one.

Websitehttp://www.redhillonrails.org/ Repository svn://rubyforge.org/var/svn/redhillonrails/trunk/vendor/plugins/cascading_javascripts Author Red Hill Consulting Tags Javascript LicenseMIT

Documentation

Install the plugin:
ruby script/plugin install  svn://rubyforge.org/var/svn/redhillonrails/trunk/vendor/plugins/cascading_javascripts

Cascading Javascripts enhances the behaviour of the built-in javascript_include_tag macro. If :defaults is passed as a parameter, the javascript_include_tag macro will load the following javascript files (if present) in order:

1. application.js; and
2. #{controller_name/action_name}.js (eg. home/index.js, customers/new.js, etc.).

This allows you to define application-wide and page-specific javascript files without needing to manually include each one.

To use, simply call javascript_include_tag from application.rhtml including :defaults as a (or the only) parameter:

<%= javascript_include_tag :defaults %>

Further Documentation

There is currently no advanced documentation for this plugin.

New documentation

Edit plugin | (0 older versions) | Last edited by: maxim_kulkin, 12 months ago