Class: Wallaby::LookupContextWrapper
- Inherits:
-
Object
- Object
- Wallaby::LookupContextWrapper
- Defined in:
- lib/services/wallaby/lookup_context_wrapper.rb
Overview
Lookup context wrapper.
This is to take care of missing template in production. It will return ‘string` template if it doesn’t know how to handle the template.
Defined Under Namespace
Classes: BlankTemplate
Instance Method Summary collapse
- #find_template(*args) ⇒ Object
-
#initialize(lookup_context) ⇒ LookupContextWrapper
constructor
A new instance of LookupContextWrapper.
Constructor Details
#initialize(lookup_context) ⇒ LookupContextWrapper
14 15 16 |
# File 'lib/services/wallaby/lookup_context_wrapper.rb', line 14 def initialize(lookup_context) @lookup_context = lookup_context end |
Instance Method Details
#find_template(*args) ⇒ Object
20 21 22 23 24 25 |
# File 'lib/services/wallaby/lookup_context_wrapper.rb', line 20 def find_template(*args) @lookup_context.find_template(*args) rescue ::ActionView::MissingTemplate raise if Rails.env.development? BlankTemplate.new end |