Sha256: b0163a19f07de386dd5e645bbfc3bd69ac39029dfbe0aa16bb52a18da91fab8f
Contents?: true
Size: 474 Bytes
Versions: 5
Compression:
Stored size: 474 Bytes
Contents
class CmsTag::Partial attr_accessor :label include CmsTag def self.regex_tag_signature(label = nil) label ||= /[\w\/]+/ /<\s*cms:partial:(#{label}):?(.*?)\s*\/?>/ end def regex_tag_signature self.class.regex_tag_signature(label) 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
5 entries across 5 versions & 1 rubygems