Module: Compass::Search::Rendering
- Extended by:
- ActiveSupport::Concern
- Included in:
- Provider
- Defined in:
- lib/compass/search/rendering.rb
Instance Method Summary collapse
Instance Method Details
#render(partial, locals = {}) ⇒ Object
22 23 24 |
# File 'lib/compass/search/rendering.rb', line 22 def render(partial, locals = {}) view_context.render(partial: partial, locals: { **@context, **locals }) end |
#view_context ⇒ Object
16 17 18 19 20 |
# File 'lib/compass/search/rendering.rb', line 16 def view_context @view_context ||= ViewContext.new.tap do |ctx| self.class.helpers.each { |mod| ctx.extend(mod) } end end |