This project is archived and is in readonly mode.
[PATCH] Using Rails.root.join everywhere where possible
Reported by Łukasz Strzałkowski | June 25th, 2010 @ 01:11 PM
What I did, I went through source and replaced File.join(Rails.root[, ...]) into Rails.root.join(...). It's really handy method for joining paths, and since we have it, we should use it ;) Especially when it is used in core in some other places. There is even some inconsistency in guides, in initialization.textile where in almost all examples Rails.root.join is used but in one place File.join(Rails.root) I think we should go for rails "joiner" and that's why I've created this path.
What do you think?
Comments and changes to this ticket
-
Łukasz Strzałkowski June 25th, 2010 @ 01:13 PM
LH is throwing an error when I try to attach a patch - I've put it on github: http://gist.github.com/452725
-
Łukasz Strzałkowski June 26th, 2010 @ 06:00 PM
- Title changed from Using Rails.root.join everywhere where possible to [PATCH] Using Rails.root.join everywhere where possible
-
Łukasz Strzałkowski June 28th, 2010 @ 10:44 AM
- Assigned user set to José Valim
-
José Valim June 28th, 2010 @ 10:50 AM
- State changed from new to incomplete
- Importance changed from to Low
Have you run tests after this change? A few tests fail here. Besides, interpolation would work just fine in these cases and would be more readable (and faster):
"#{Rails.root}/lib/templates/fixjour"
-
José Valim July 8th, 2010 @ 10:13 PM
- State changed from incomplete to invalid
Ok, I'm marking this one as invalid. Feel free to reopen the ticket if you have a patch using interpolation. :)
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>