This project is archived and is in readonly mode.
Asset include helpers should consider subdirectories when used with :all
-
Emilio Tagua
- 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
- 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
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
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.
-
Pratik
I agree that this has to be an opt-in feature ( what José said ).
-
Damian Janowski
OK, I'm submitting a new patch with the opt-in alternative:
javascript_include_tag :all, :recursive => true stylesheet_link_tag :all, :recursive => trueTests and docs updated.
-
José Valim
Oh, nice!
+1
-
David Dollar
- 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
-
Clemens Kofler
Now that it's backwards compatible, I like it too.
+1
-
Pratik
- State changed from incomplete to open
-
Repository
- 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