module Cell::ViewModel::Partial
Allows to render global partials, for example.
render partial: "../views/shared/container"
Public Instance Methods
process_options!(options)
click to toggle source
Calls superclass method
# File lib/cell/partial.rb, line 5 def process_options!(options) super return unless partial = options[:partial] parts = partial.split("/") view = parts.pop view = "_#{view}" view += ".#{options[:formats].first}" if options[:formats] prefixes = self.class.view_paths.collect { |path| ([path] + parts).join("/") } options.merge!(view: view, prefixes: prefixes) end