aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGuillermo Iguaran <guilleiguaran@gmail.com>2012-12-31 18:07:21 -0500
committerGuillermo Iguaran <guilleiguaran@gmail.com>2012-12-31 18:07:21 -0500
commit25c8770a6cbbc4922446085addaa5a41d0e4e1b6 (patch)
tree20578e63854d432e978318fe0e5216b682d9e623
parent8ecaf133f3adbda93ecae0af0ffbd29f5efbe7f0 (diff)
downloadrails-25c8770a6cbbc4922446085addaa5a41d0e4e1b6.tar.gz
rails-25c8770a6cbbc4922446085addaa5a41d0e4e1b6.tar.bz2
rails-25c8770a6cbbc4922446085addaa5a41d0e4e1b6.zip
formatted_code_for should be private
-rw-r--r--actionpack/lib/action_view/template/error.rb24
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