From 25c8770a6cbbc4922446085addaa5a41d0e4e1b6 Mon Sep 17 00:00:00 2001 From: Guillermo Iguaran Date: Mon, 31 Dec 2012 18:07:21 -0500 Subject: formatted_code_for should be private --- actionpack/lib/action_view/template/error.rb | 24 ++++++++++++------------ 1 file 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 -- cgit v1.2.3