mirror of
https://github.com/haml/haml.git
synced 2022-11-09 12:33:31 -05:00
Profiling and Benchmarking work.
git-svn-id: svn://hamptoncatlin.com/haml/branches/1.5dev@188 7063305b-7217-0410-af8c-cdc13e5119b9
This commit is contained in:
parent
01dad1e2e8
commit
dfb71265cd
2 changed files with 3 additions and 3 deletions
|
@ -33,8 +33,8 @@ module Haml
|
|||
#
|
||||
def benchmark(runs = 100, template_name = 'standard', other_template = nil)
|
||||
if other_template.nil?
|
||||
haml_template = "templates/#{template_name}"
|
||||
rhtml_template = "rhtml/#{template_name}"
|
||||
haml_template = "haml/templates/#{template_name}"
|
||||
rhtml_template = "haml/rhtml/#{template_name}"
|
||||
else
|
||||
haml_template = template_name
|
||||
rhtml_template = other_template
|
||||
|
|
|
@ -12,7 +12,7 @@ module Haml
|
|||
|
||||
# Creates a new profiler that looks for templates in the base
|
||||
# directory.
|
||||
def initialize(base = File.join(File.dirname(__FILE__), 'templates'))
|
||||
def initialize(base = File.join(File.dirname(__FILE__), 'haml', 'templates'))
|
||||
ActionView::Base.register_template_handler("haml", Haml::Template)
|
||||
unless base.class == ActionView::Base
|
||||
@base = ActionView::Base.new(base)
|
||||
|
|
Loading…
Add table
Reference in a new issue