Skip to content

thorncp/improved-includes

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ImprovedIncludes
================

Improved Includes expands upon the functionality of the javascript_include_tag 
and stylesheet_link_tag methods, adding functionality to recursively include
subdirectories.

Installation
============
Rails 3.0
rails plugin install git://github.com/thorncp/improved-includes.git

Rails <= 2.3.5
script/plugin install git://github.com/thorncp/improved-includes.git

Examples
========

# Two new methods are made available to all views in the application: 
# - javascript_includes(*sources)
# - stylesheet_links(*sources)

# To include everything in a directory, just pass the name ending with a '/'.
<%= stylesheet_links 'themes/' %>

# All of the options available to javascript_include_tag and stylesheet_link_tag
# are still available
<%= stylesheet_links 'themes/', :recursive => true, :cache => 'themes' %>
<%= javascript_includes :all, :recursive => true, :cache => 'everything' %>

# Mix and match files and directories
<%= stylesheet_links 'application', 'themes/' %>
<%= javascript_includes 'jquery', 'application', 'utilities/validations/' %>

Copyright (c) 2010 Chris Thorn, released under the MIT license

About

Improved Includes expands upon Rails' javascript_include_tag and stylesheet_link_tag methods, adding functionality to recursively include subdirectories.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages