Sha256: 15e4fda074c7fdaf4777854bd590a10420338103e397b372bd61c3fd2576f3d1

Contents?: true

Size: 499 Bytes

Versions: 2

Compression:

Stored size: 499 Bytes

Contents

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

  def content
    "<%= render :partial => 'cms_content/tabs/tabs', locals: {page_id: #{page.id}} %>"
  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/tabs.rb
comfypress-0.1.4 lib/comfypress/tags/tabs.rb