Sha256: 4b507fdf27bc01d3c6df09c431c0d5c4f761c8a269b14f56b65e423daec8fa5d
Contents?: true
Size: 415 Bytes
Versions: 9
Compression:
Stored size: 415 Bytes
Contents
class ComfortableMexicanSofa::Tag::Partial include ComfortableMexicanSofa::Tag def self.regex_tag_signature(label = nil) label ||= /[\w\/\-]+/ /\{\{\s*cms:partial:(#{label}):?(.*?)\s*\}\}/ end def content ps = params.split(':').collect_with_index{|p, i| ":param_#{i+1} => '#{p}'"}.join(', ') "<%= render :partial => '#{label}'#{ps.blank?? nil : ", :locals => {#{ps}}"} %>" end end
Version data entries
9 entries across 9 versions & 1 rubygems