class Viu::Layout
Constants
- RAILS_6_0
- RAILS_6_1_WITH_PRERELEASES
Public Instance Methods
render_in(view_context, &block)
click to toggle source
# File lib/viu/layout.rb, line 22 def render_in(view_context, &block) __setup!(view_context) rails_version = ::Rails.gem_version if rails_version >= RAILS_6_1_WITH_PRERELEASES Renderer.new(@lookup_context, layout: nil).render(__fetch_template!, self, block).body elsif rails_version >= RAILS_6_0 Renderer.new(@lookup_context).render(self, { partial: __fetch_template!, layout: nil }, block).body else Renderer.new(@lookup_context).render(self, { partial: __fetch_template!, layout: nil }, block) end end