spud_cms 0.9.5 → 0.9.6

Sign up to get free protection for your applications and to get access to all the features.
@@ -6,7 +6,7 @@ class SpudPagePartial < ActiveRecord::Base
6
6
  before_save :maintain_revisions
7
7
  before_save :update_symbol_name
8
8
  before_save :postprocess_content
9
-
9
+ after_save :update_taglist
10
10
  def update_symbol_name
11
11
  self.symbol_name = self.name.parameterize.underscore
12
12
  end
@@ -17,11 +17,13 @@ class SpudPagePartial < ActiveRecord::Base
17
17
 
18
18
  def postprocess_content
19
19
  template = Liquid::Template.parse(self.content) # Parses and compiles the template
20
- update_taglist(template)
20
+
21
21
  self.content_processed = template.render('page' => self.spud_page)
22
22
  end
23
23
 
24
- def update_taglist(template)
24
+ def update_taglist
25
+ template = Liquid::Template.parse(self.content) # Parses and compiles the template
26
+
25
27
  self.spud_page_liquid_tags.all.each do |tag|
26
28
  tag.destroy
27
29
  end
@@ -8,7 +8,7 @@ class SpudSnippet < ActiveRecord::Base
8
8
  scope :site, lambda {|sid| where(:site_id => sid)}
9
9
 
10
10
  before_save :postprocess_content
11
-
11
+ after_save :update_taglist
12
12
  def postprocess_content
13
13
  template = Liquid::Template.parse(self.content) # Parses and compiles the template
14
14
  update_taglist(template)
@@ -27,7 +27,9 @@ class SpudSnippet < ActiveRecord::Base
27
27
  end
28
28
 
29
29
 
30
- def update_taglist(template)
30
+ def update_taglist
31
+ template = Liquid::Template.parse(self.content) # Parses and compiles the template
32
+
31
33
  self.spud_page_liquid_tags.all.each do |tag|
32
34
  tag.destroy
33
35
  end
@@ -1,5 +1,5 @@
1
1
  module Spud
2
2
  module Cms
3
- VERSION = "0.9.5"
3
+ VERSION = "0.9.6"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: spud_cms
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.5
4
+ version: 0.9.6
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-11-20 00:00:00.000000000 Z
12
+ date: 2012-12-01 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rails
@@ -392,7 +392,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
392
392
  version: '0'
393
393
  segments:
394
394
  - 0
395
- hash: 117673802606098490
395
+ hash: -2036920652872828503
396
396
  required_rubygems_version: !ruby/object:Gem::Requirement
397
397
  none: false
398
398
  requirements:
@@ -401,7 +401,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
401
401
  version: '0'
402
402
  segments:
403
403
  - 0
404
- hash: 117673802606098490
404
+ hash: -2036920652872828503
405
405
  requirements: []
406
406
  rubyforge_project:
407
407
  rubygems_version: 1.8.24