| 1 | | module ActionView # :nodoc: |
|---|
| 2 | | class Base # :nodoc: |
|---|
| 3 | | def render_template(template_extension, template, file_path = nil, local_assigns = {}) |
|---|
| 4 | | if handler = @@template_handlers[template_extension] |
|---|
| 5 | | template ||= read_template_file(file_path, template_extension) |
|---|
| 6 | | handler.new(self).render(template, local_assigns, file_path) |
|---|
| 7 | | else |
|---|
| 8 | | compile_and_render_template(template_extension, template, file_path, local_assigns) |
|---|
| 9 | | end |
|---|
| 10 | | end |
|---|
| 11 | | end |
|---|
| 12 | | end |
|---|
| | 1 | # module ActionView # :nodoc: |
|---|
| | 2 | # class Base # :nodoc: |
|---|
| | 3 | # def render_template(template_extension, template, file_path = nil, local_assigns = {}) |
|---|
| | 4 | # if handler = @@template_handlers[template_extension] |
|---|
| | 5 | # template ||= read_template_file(file_path, template_extension) |
|---|
| | 6 | # handler.new(self).render(template, local_assigns, file_path) |
|---|
| | 7 | # else |
|---|
| | 8 | # compile_and_render_template(@@template_handlers[template_extension.to_sym], template, file_path, local_assigns) |
|---|
| | 9 | # end |
|---|
| | 10 | # end |
|---|
| | 11 | # end |
|---|
| | 12 | # end |
|---|