Sha256: fff8f2d90fbdbdace6627c6c66c6061336e03a11f7962ce85b6c898bfcf1c433
Contents?: true
Size: 479 Bytes
Versions: 17
Compression:
Stored size: 479 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
17 entries across 17 versions & 2 rubygems