Class: Wallaby::CachedCompiledErb
- Inherits:
-
ActionView::Template::Handlers::ERB
- Object
- ActionView::Template::Handlers::ERB
- Wallaby::CachedCompiledErb
- Defined in:
- lib/handlers/wallaby/cached_compiled_erb.rb
Overview
TODO: move this kind of logic into a gem called faster rails :)
Instance Method Summary collapse
Instance Method Details
#call(template) ⇒ Object
5 6 7 8 9 10 11 12 13 |
# File 'lib/handlers/wallaby/cached_compiled_erb.rb', line 5 def call(template) if Rails.env.development? super else Rails.cache.fetch "wallaby/views/erb/#{ template.inspect }" do super end end end |