diff options
-rw-r--r-- | actionpack/lib/action_view/template/error.rb | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/actionpack/lib/action_view/template/error.rb b/actionpack/lib/action_view/template/error.rb index 662e1ac66b..b479f991bc 100644 --- a/actionpack/lib/action_view/template/error.rb +++ b/actionpack/lib/action_view/template/error.rb @@ -93,18 +93,6 @@ module ActionView formatted_code_for(source_code, start_on_line, indent, output) end - def formatted_code_for(source_code, line_counter, indent, output) - start_value = (output == :html) ? {} : "" - source_code.inject(start_value) do |result, line| - line_counter += 1 - if output == :html - result.update(line_counter.to_s => "%#{indent}s %s\n" % ["", line]) - else - result << "%#{indent}s: %s\n" % [line_counter, line] - end - end - end - def sub_template_of(template_path) @sub_templates ||= [] @sub_templates << template_path @@ -131,6 +119,18 @@ module ActionView 'in ' end + file_name end + + def formatted_code_for(source_code, line_counter, indent, output) + start_value = (output == :html) ? {} : "" + source_code.inject(start_value) do |result, line| + line_counter += 1 + if output == :html + result.update(line_counter.to_s => "%#{indent}s %s\n" % ["", line]) + else + result << "%#{indent}s: %s\n" % [line_counter, line] + end + end + end end end |