This project is archived and is in readonly mode.
Asset include helpers should consider subdirectories when used with :all
Reported by Damian Janowski | July 4th, 2008 @ 09:22 PM
(New title is Add a option to javascript_include_tag and stylesheet_link_tag to be used together with )
This means that if you have something like:
public/javascripts/super_calendar/calendar.js
public/stylesheets/super_calendar/calendar.css
Those will be included when calling
javascript_include_tag :all, :recursive => true
stylesheet_link_tag :all, :recursive => true
Tests and docs updated.
Comments and changes to this ticket
-
Emilio Tagua June 25th, 2008 @ 11:29 PM
- Tag set to actionpack, patch, tested
+1
I think all should mean ALL of them.
But it would be helpful to have an option to specify that it should not include subdirectories.
-
Pratik June 27th, 2008 @ 01:49 PM
- State changed from new to incomplete
- Assigned user set to Pratik
1. Patch should cache the Dir[File.join(dir, '**', "*.#{extension}")] output.
2. It'd be nice to drop an email to railscore mailing list :)
Thanks.
-
José Valim June 30th, 2008 @ 11:37 PM
Wouldn't be better if You explicitly declare it?
Like:
javascript_include_tag :all, :directories => true
stylesheet_link_tag :all, :directories => true
For example, all my javascripts are packed (http://dean.edwards.name/packer/) and I have a subfolder /public/javascript/source. It would be a disaster if it was merged and sent to everyone in production.
-
Clemens Kofler July 1st, 2008 @ 12:10 AM
I'd have to agree with José. Making it a default could lead to some really wicked behavior if you're using 3rd party stuff or, e.g., if you create some JavaScript dynamically using a JavascriptsController and/or SASS.
-
Damian Janowski July 4th, 2008 @ 09:19 PM
OK, I'm submitting a new patch with the opt-in alternative:
javascript_include_tag :all, :recursive => true stylesheet_link_tag :all, :recursive => true
Tests and docs updated.
-
David Dollar July 6th, 2008 @ 06:54 AM
- Tag changed from actionpack, patch, tested to actionpack, patch, tested, verified
All tests pass and I'd like to see this one make it in.
+1
-
Pratik July 6th, 2008 @ 08:33 PM
- State changed from incomplete to open
-
Repository July 8th, 2008 @ 02:09 PM
- State changed from open to resolved
(from [91320f2a809d3a59efabd9f839fe9b879f4a9b29]) Add :recursive option to javascript_include_tag and stylesheet_link_tag to be used along with :all. [#480 state:resolved]
Signed-off-by: Pratik Naik
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile »
<h2 style="font-size: 14px">Tickets have moved to Github</h2>
The new ticket tracker is available at <a href="https://github.com/rails/rails/issues">https://github.com/rails/rails/issues</a>