public
Fork of halorgium/mephisto
Description: A mirror of the mephisto code-base
Homepage: http://mephistoblog.com/
Clone URL: git://github.com/technoweenie/mephisto.git
Click here to lend your support to: mephisto and make a donation at www.pledgie.com !
Add sorting for liquid for statements.

git-svn-id: http://svn.techno-weenie.net/projects/mephisto/trunk@2531 
567b1171-46fb-0310-a4c9-b4bef9110e78
technoweenie (author)
Thu Dec 07 13:38:39 -0800 2006
commit  ce9925833553138e50c0d5b27e1d3f5ccc9d10f3
tree    aacc93395145f63dc134c8a5e0510c7e9d85413e
parent  b312360bb5e1e53100ad2cc5755e7920858ebc4d
...
9
10
11
 
 
 
 
 
12
13
14
...
9
10
11
12
13
14
15
16
17
18
19
0
@@ -9,6 +9,11 @@
0
   end
0
 
0
 * fix that only published articles are available as section pages.
0
+* SVN *
0
+
0
+Add sorting for liquid for statements.
0
+
0
+ {% for page in section.pages limit: 3 sort_by: title %}
0
 
0
 * 0.7.3 *
0
 
...
103
104
105
106
 
107
108
109
...
103
104
105
 
106
107
108
109
0
@@ -103,7 +103,7 @@ context "Home Section Feed" do
0
   specify "should sanitize content" do
0
     text = @contents.first.get_text.to_s.strip
0
     evil = "<script>hi</script><a onclick=\"foo\" href=\"#\">linkage</a></p>"
0
- good = "&lt;script>hi&lt;/script><a href='#'>linkage</a></p>"
0
+ good = "<a href='#'>linkage</a></p>"
0
     assert !text.ends_with(CGI::escapeHTML(evil)), "'#{text.inspect}' was not sanitized"
0
     assert text.ends_with(CGI::escapeHTML(good)), "'#{text.inspect}' was not sanitized"
0
   end
...
91
92
93
 
 
 
 
94
95
96
...
91
92
93
94
95
96
97
98
99
100
0
@@ -91,6 +91,10 @@ class Test::Unit::TestCase
0
   self.use_transactional_fixtures = true
0
   self.use_instantiated_fixtures = false
0
 
0
+ def assert_template_result(expected, template, assigns={}, message=nil)
0
+ assert_equal expected, Liquid::Template.parse(template).render(assigns)
0
+ end
0
+
0
   def host!(hostname)
0
     @request.host = hostname
0
   end
...
122
123
124
 
125
126
127
128
...
122
123
124
125
126
127
128
129
0
@@ -122,6 +122,7 @@ ActiveRecord::Base.class_eval do
0
   expiring_attr_reader :referenced_cache_key, '"[#{[id, self.class.name] * ":"}]"'
0
 end
0
 
0
+Liquid::For.send :include, Mephisto::Liquid::ForWithSorting
0
 
0
 require 'mephisto_core/admin'
0
 require 'mephisto_core/plugin'
0
\ No newline at end of file

Comments

    No one has commented yet.