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 !
set comments count default, reordered articles, and added liquid textile 
block

git-svn-id: http://svn.techno-weenie.net/projects/mephisto@567 
567b1171-46fb-0310-a4c9-b4bef9110e78
technoweenie (author)
Tue Jan 03 20:46:57 -0800 2006
commit  b18a88d387d68196eabdc03ab3b0529b85f7401b
tree    c9fc29aeabf80270004f70b868cf40d2732aff86
parent  9cc5ffc5cb9b26f764dca17ed9bccc7bbaf9373c
...
2
3
4
5
 
6
7
8
...
2
3
4
 
5
6
7
8
0
@@ -2,7 +2,7 @@ class Tag < ActiveRecord::Base
0
   has_many :taggings, :dependent => :delete_all
0
   has_many :articles, :through => :taggings, :conditions => 'articles.published_at IS NOT NULL' do
0
     def find_by_date(options = {})
0
- find(:all, { :order => 'articles.published_at' }.merge(options))
0
+ find(:all, { :order => 'articles.published_at desc' }.merge(options))
0
     end
0
 
0
     def find_by_position(options = {})
...
53
54
55
56
57
 
 
58
...
53
54
55
 
56
57
58
59
0
@@ -53,4 +53,5 @@ end
0
 # Include your application configuration below
0
 require 'string_ext'
0
 require 'time_ext'
0
-Liquid::Template.register_filter(Mephisto::Filter)
0
\ No newline at end of file
0
+Liquid::Template.register_filter(Mephisto::Filter)
0
+Liquid::Template.register_block('textile', Mephisto::Textile)
0
\ No newline at end of file
...
2
3
4
5
 
6
7
8
...
21
22
23
24
 
25
26
27
...
2
3
4
 
5
6
7
8
...
21
22
23
 
24
25
26
27
0
@@ -2,7 +2,7 @@
0
 # migrations feature of ActiveRecord to incrementally modify your database, and
0
 # then regenerate this schema definition.
0
 
0
-ActiveRecord::Schema.define() do
0
+ActiveRecord::Schema.define(:version => 1) do
0
 
0
   create_table "articles", :force => true do |t|
0
     t.column "article_id", :integer
0
@@ -21,7 +21,7 @@ ActiveRecord::Schema.define() do
0
     t.column "author_url", :string
0
     t.column "author_email", :string
0
     t.column "author_ip", :string, :limit => 100
0
- t.column "comments_count", :integer
0
+ t.column "comments_count", :integer, :default => 0
0
   end
0
 
0
   create_table "taggings", :force => true do |t|
...
1
2
 
 
3
...
 
1
2
3
4
0
@@ -1 +1,2 @@
0
-require 'mephisto/filter'
0
\ No newline at end of file
0
+require 'mephisto/filter'
0
+require 'mephisto/textile'
0
\ No newline at end of file
...
23
24
25
26
 
27
28
29
...
23
24
25
 
26
27
28
29
0
@@ -23,7 +23,7 @@ class MephistoControllerTest < Test::Unit::TestCase
0
   def test_list_by_tags
0
     get :list, :tags => []
0
     assert_equal tags(:home), assigns(:tag)
0
- assert_equal [articles(:another).to_liquid, articles(:welcome).to_liquid], assigns(:articles)
0
+ assert_equal [articles(:welcome).to_liquid, articles(:another).to_liquid], assigns(:articles)
0
     get :list, :tags => %w(about)
0
     assert_equal tags(:about), assigns(:tag)
0
     assert_equal [articles(:welcome).to_liquid], assigns(:articles)
...
9
10
11
12
 
13
14
15
...
9
10
11
 
12
13
14
15
0
@@ -9,7 +9,7 @@ class TagTest < Test::Unit::TestCase
0
   end
0
 
0
   def test_articles_association_by_published_at
0
- assert_equal [articles(:another), articles(:welcome)], tags(:home).articles.find_by_date
0
+ assert_equal [articles(:welcome), articles(:another)], tags(:home).articles.find_by_date
0
   end
0
 
0
   def test_articles_association_by_position

Comments

    No one has commented yet.