Browse files

formatted_code_for should be private

  • Loading branch information...
1 parent 8ecaf13 commit 25c8770a6cbbc4922446085addaa5a41d0e4e1b6 @guilleiguaran guilleiguaran committed Dec 31, 2012
Showing with 12 additions and 12 deletions.
  1. +12 −12 actionpack/lib/action_view/template/error.rb
View
24 actionpack/lib/action_view/template/error.rb
@@ -93,18 +93,6 @@ def source_extract(indentation = 0, output = :console)
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 @@ def source_location
'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

0 comments on commit 25c8770

Please sign in to comment.