Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Refactored watchable_args and build_original_fullpath methods in rail…

…ties/lib/rails/application.rb
  • Loading branch information...
commit 516f102e5f8e481c31aebdcc562d98e87fd0c5ed 1 parent 3d25fa0
Nathan Broadbent ndbroadbent authored
Showing with 2 additions and 13 deletions.
  1. +2 −13 railties/lib/rails/application.rb
15 railties/lib/rails/application.rb
View
@@ -114,11 +114,8 @@ def routes_reloader #:nodoc:
# Returns an array of file paths appended with a hash of directories-extensions
# suitable for ActiveSupport::FileUpdateChecker API.
def watchable_args
- files = []
- files.concat config.watchable_files
+ files, dirs = config.watchable_files.dup, config.watchable_dirs.dup
- dirs = {}
- dirs.merge! config.watchable_dirs
ActiveSupport::Dependencies.autoload_paths.each do |path|
dirs[path.to_s] = [:rb]
end
@@ -293,15 +290,7 @@ def initialize_console #:nodoc:
end
def build_original_fullpath(env)
- path_info = env["PATH_INFO"]
- query_string = env["QUERY_STRING"]
- script_name = env["SCRIPT_NAME"]
-
- if query_string.present?
- "#{script_name}#{path_info}?#{query_string}"
- else
- "#{script_name}#{path_info}"
- end
+ ["#{env["SCRIPT_NAME"]}#{env["PATH_INFO"]}", env["QUERY_STRING"]].reject(&:blank?).join("?")
end
end
end
Please sign in to comment.
Something went wrong with that request. Please try again.