public
Description: This contains various plugins for Feather
Clone URL: git://github.com/eldiablo/feather-plugins.git
Search Repo:
Click here to lend your support to: feather-plugins and make a donation at www.pledgie.com !
Threw in caching for sidebar groups
mleung (author)
Tue Apr 15 15:17:13 -0700 2008
commit  0277d4531788b4628cf570ccb5f6a9e854c05859
tree    2cbd37ddc6175df025ae37d15f3d13ddae41b988
parent  e33f00201ab3043ec6a08d4a71ae5177922992c2
...
2
3
4
5
 
 
 
 
6
7
8
...
2
3
4
 
5
6
7
8
9
10
11
0
@@ -2,6 +2,9 @@ class Comments < Application
0
   def create
0
     @comment = Comment.new(params[:comment])
0
     session[:comment_error] = @comment.errors if !@comment.save
0
- redirect Article[@comment.article_id].permalink
0
+ article = Article[@comment.article_id]
0
+ expire_index
0
+ expire_article(article)
0
+ redirect article.permalink
0
   end
0
 end
0
\ No newline at end of file
...
9
10
11
 
 
12
13
14
...
9
10
11
12
13
14
15
16
0
@@ -9,6 +9,8 @@ class Comment < DataMapper::Base
0
   
0
   validates_presence_of :name, :comment, :article_id
0
   
0
+ belongs_to :article
0
+
0
   def self.all_for_post(article_id, method = :all)
0
     self.send(method, {:article_id => article_id, :order => "created_at"})
0
   end
...
21
22
23
 
24
25
26
...
33
34
35
 
36
37
38
39
 
40
41
42
...
21
22
23
24
25
26
27
...
34
35
36
37
38
39
40
41
42
43
44
45
0
@@ -21,6 +21,7 @@ module Admin
0
       else
0
         render :new
0
       end
0
+ expire_all_pages
0
     end
0
 
0
     def edit
0
@@ -33,10 +34,12 @@ module Admin
0
       else
0
         render :edit
0
       end
0
+ expire_all_pages
0
     end
0
     
0
     def delete
0
       @sidebar_group.destroy!
0
+ expire_all_pages
0
       redirect url(:admin_sidebar_groups)
0
     end
0
     

Comments

    No one has commented yet.