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.
- data/app/models/spud_page_partial.rb +5 -3
- data/app/models/spud_snippet.rb +4 -2
- data/lib/spud_cms/version.rb +1 -1
- metadata +4 -4
@@ -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
|
-
|
20
|
+
|
21
21
|
self.content_processed = template.render('page' => self.spud_page)
|
22
22
|
end
|
23
23
|
|
24
|
-
def update_taglist
|
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
|
data/app/models/spud_snippet.rb
CHANGED
@@ -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
|
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
|
data/lib/spud_cms/version.rb
CHANGED
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.
|
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-
|
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:
|
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:
|
404
|
+
hash: -2036920652872828503
|
405
405
|
requirements: []
|
406
406
|
rubyforge_project:
|
407
407
|
rubygems_version: 1.8.24
|