/
README
35 lines (26 loc) · 1.12 KB
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
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