Sha256: 48c335e9ca7ed43222ed8eeb6bbf349a47f6cf2a4fb08337167add68a534a6be
Contents?: true
Size: 700 Bytes
Versions: 2
Compression:
Stored size: 700 Bytes
Contents
require 'liquid' require_relative '../../app/helpers/spud_banners_helper' module Spud module Banners class BannerSetTag < Liquid::Tag include Sprockets::Rails::Helper # include Sprockets::Rails::Helpers::IsolatedHelper include ActionView::Helpers include ActionView::Context include SpudBannersHelper def initialize(tag_name, set_identifer, tokens) @banner_set = SpudBannerSet.find_by_identifier(set_identifer) end def tag_name return 'banner_set' end def tag_value return @banner_set.name end def render(context) return spud_banners_for_set(@banner_set) end end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
spud_banners-1.0.0 | lib/spud_banners/liquid_tags.rb |
spud_banners-1.0.0.rc1 | lib/spud_banners/liquid_tags.rb |