aboutsummaryrefslogtreecommitdiffstats
path: root/railties/lib/rails/paths.rb
diff options
context:
space:
mode:
authorKir Shatrov <shatrov@me.com>2015-08-04 17:53:15 +0200
committerKir Shatrov <shatrov@me.com>2015-08-10 00:17:49 +0200
commitf50e90a1aeaee0e1e907e51cd2a9349d0af2c087 (patch)
treea602a07ffa8249e60b4538de3c8c7c4840405aff /railties/lib/rails/paths.rb
parent7a3ca69959e312a215d5e8144fca79a08654fd89 (diff)
downloadrails-f50e90a1aeaee0e1e907e51cd2a9349d0af2c087.tar.gz
rails-f50e90a1aeaee0e1e907e51cd2a9349d0af2c087.tar.bz2
rails-f50e90a1aeaee0e1e907e51cd2a9349d0af2c087.zip
Reload I18n locales in development
Diffstat (limited to 'railties/lib/rails/paths.rb')
-rw-r--r--railties/lib/rails/paths.rb10
1 files changed, 10 insertions, 0 deletions
diff --git a/railties/lib/rails/paths.rb b/railties/lib/rails/paths.rb
index ebcaaaba46..8a7aa6f50a 100644
--- a/railties/lib/rails/paths.rb
+++ b/railties/lib/rails/paths.rb
@@ -123,6 +123,11 @@ module Rails
options[:load_path] ? load_path! : skip_load_path!
end
+ # :nodoc:
+ def absolute_current
+ File.expand_path(@current, @root.path)
+ end
+
def children
keys = @root.keys.find_all { |k|
k.start_with?(@current) && k != @current
@@ -175,6 +180,11 @@ module Rails
@paths
end
+ # :nodoc:
+ def extensions
+ $1.split(',') if @glob =~ /\{([\S]+)\}/
+ end
+
# Expands all paths against the root and return all unique values.
def expanded
raise "You need to set a path root" unless @root.path