Module: TbLiquid::ActsAsLiquidContent
- Extended by:
- ActiveSupport::Concern
- Defined in:
- app/concerns/tb_liquid/acts_as_liquid_content.rb
Defined Under Namespace
Modules: ClassMethods
Instance Method Summary collapse
Instance Method Details
#postprocess_content ⇒ Object
9 10 11 |
# File 'app/concerns/tb_liquid/acts_as_liquid_content.rb', line 9 def postprocess_content() raise 'Models that call acts_as_liquid_content should implement a postprocess_content method.' end |
#update_spud_liquid_tag_list ⇒ Object
13 14 15 16 17 18 19 20 21 22 23 |
# File 'app/concerns/tb_liquid/acts_as_liquid_content.rb', line 13 def update_spud_liquid_tag_list() if @tb_liquid_template_parsed.nil? @tb_liquid_template_parsed = ::Liquid::Template.parse(self.content) end self..destroy_all @tb_liquid_template_parsed.root.nodelist.each do |node| if !node.is_a?(String) && defined?(node.tag_name) && defined?(node.tag_value) self..create(:tag_name => node.tag_name,:value => node.tag_value) end end end |