Erubis는 레일스 성능에 도움이 될까?
# Method to check whether template compilation is necessary.
# The template will be compiled if the inline template or file has not been compiled yet,
# if local_assigns has a new key, which isn't supported by the compiled code yet,
# or if the file has changed on disk and checking file mods hasn't been disabled.
ActionView::Base 구현 일부
- def compile_template?(template, file_name, local_assigns)
- if compile_time = @@compile_time[render_symbol]
- template_changed_since?(file_name, compile_time)
- else
- true
- end
end
History
Last edited on 07/04/2007 20:55 by deepblue
Comments (0)