Use `File.expand_path` instead of `File.join` #8472

merged 1 commit into from Dec 10, 2012


None yet

4 participants

Ruby on Rails member
@rafaelfranca rafaelfranca merged commit 05e6123 into rails:master Dec 10, 2012
Ruby on Rails member


@carlosantoniodasilva I'm curious, why was this change made? Is it preferable to use File.expand_path instead of File.join if the first param is File.dirname(__FILE__)? If so, there are a lot of other places where this change is needed, I could write the PR for that.

Ruby on Rails member

@ptn It's just that it's shorter and reads better this way, and since the WelcomeController with a default root action for dev was added with that, it was asked to change this one as well. I think we can change as we go, not sure there's a need to change everywhere :). Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment