Improved Includes expands upon Rails' javascript_include_tag and stylesheet_link_tag methods, adding functionality to recursively include subdirectories.
License
thorncp/improved-includes
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
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 0
No packages published