Permalink
Browse files

Merge pull request #12752 from notalex/expand_path_refactoring

Refactor File.expand_path usage to remove additional File.join
  • Loading branch information...
2 parents 026d055 + 01ef2c1 commit 7d17b1dedbce7daf5c5c5b39eff1c2f5661fab0e @senny senny committed Nov 5, 2013
@@ -52,7 +52,7 @@ class AbstractHelpersBlock < ControllerWithHelpers
class AbstractInvalidHelpers < AbstractHelpers
include ActionController::Helpers
- path = File.join(File.expand_path('../../../fixtures', __FILE__), "helpers_missing")
+ path = File.expand_path('../../../fixtures/helpers_missing', __FILE__)
$:.unshift(path)
self.helpers_path = path
end
View
@@ -1,6 +1,6 @@
#!/usr/bin/env ruby
-git_path = File.join(File.expand_path('../../..', __FILE__), '.git')
+git_path = File.expand_path('../../../.git', __FILE__)
if File.exist?(git_path)
railties_path = File.expand_path('../../lib', __FILE__)
@@ -326,7 +326,7 @@ def prepare!
end
def self.default_rc_file
- File.join(File.expand_path('~'), '.railsrc')
+ File.expand_path('~/.railsrc')
end
private

0 comments on commit 7d17b1d

Please sign in to comment.