Sha256: b73dd3f34feabc5f5558be9b77cb02e5fbf18a52f82657e0b0f3891bc51ebb8b
Contents?: true
Size: 521 Bytes
Versions: 13
Compression:
Stored size: 521 Bytes
Contents
# Allows to render global partials, for example. # # render partial: "../views/shared/container" module Cell::ViewModel::Partial 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 end
Version data entries
13 entries across 13 versions & 1 rubygems