Sha256: b8be62653144047b7b051e83d1432f55b69bc31001349ec7148dbb7ab1b5c5a2

Contents?: true

Size: 482 Bytes

Versions: 2

Compression:

Stored size: 482 Bytes

Contents

class ComfyPress::Tag::Carousel
  include ComfyPress::Tag
  
  def self.regex_tag_signature(identifier = nil)
    identifier ||= /[\w\-]+/
    /\{\{\s*cms:carousel:(#{identifier})\s*\}\}/ # not really using identifier
  end

  def content
    "<%= render :partial => 'cms_content/carousel' %>"
  end

  def render
    whitelist = ComfyPress.config.allowed_partials
    if whitelist.is_a?(Array)
      content if whitelist.member?(identifier)
    else
      content
    end
  end
end

Version data entries

2 entries across 1 versions & 1 rubygems

Version Path
comfypress-0.1.4 db/lib/comfypress/tags/carousel.rb
comfypress-0.1.4 lib/comfypress/tags/carousel.rb