Class: ActionView::TemplateHandlers::SafeHaml
- Inherits:
-
TemplateHandler
- Object
- TemplateHandler
- ActionView::TemplateHandlers::SafeHaml
show all
- Extended by:
- SafemodeHandler
- Defined in:
- lib/action_view/template_handlers/safe_haml.rb
Class Method Summary
collapse
Instance Method Summary
collapse
delegate_methods, helper_methods, skip_assigns, valid_assigns
Class Method Details
.line_offset ⇒ Object
10
11
12
|
# File 'lib/action_view/template_handlers/safe_haml.rb', line 10
def self.line_offset
3
end
|
Instance Method Details
#compile(template) ⇒ Object
14
15
16
17
18
19
20
21
22
23
24
|
# File 'lib/action_view/template_handlers/safe_haml.rb', line 14
def compile(template)
src = template.respond_to?(:source) ? template.source : template
filename = template.filename rescue nil
options = Haml::Template.options.dup
haml = Haml::Engine.new template, options
methods = delegate_methods + ActionController::Routing::Routes.named_routes.helpers
haml.precompile_for_safemode filename, ignore_assigns, methods
end
|