public
Fork of technoweenie/mephisto
Description: A mirror of the mephisto code-base
Homepage: http://mephistoblog.com/
Clone URL: git://github.com/b3b0p/mephisto.git
Fix problem with URLs on the moderate comments page.

The URLs to the Ajax actions were wrong because the article's ID wasn't 
present.  Instead of using @article (which is nil in this case), use the 
comment's article.
francois (author)
Tue Mar 04 10:37:54 -0800 2008
commit  96cdc957653159c24ebf59a5096bcde6554ba58f
tree    d9c59c8f7caeba2d4f0503e424f3763252b67878
parent  628cbde5cdced976670e81a55a71f8d25f123b2d
...
24
25
26
27
 
28
29
 
30
31
 
32
33
 
34
35
36
...
62
63
64
65
66
 
...
24
25
26
 
27
28
 
29
30
 
31
32
 
33
34
35
36
...
62
63
64
 
65
66
0
@@ -24,13 +24,13 @@ Comments for all articles
0
     <span class="meta">
0
       <cite>&mdash; <%= author_link_for comment %><%= %( (#{comment.author_email})) unless comment.author_email.blank? %> said <%= time_ago_in_words comment.created_at %> ago</cite>
0
     
0
- <%= link_to_remote 'Edit', :url => edit_article_comment_path(@article, comment), :method => :get %> |
0
+ <%= link_to_remote 'Edit', :url => edit_article_comment_path(comment.article, comment), :method => :get %> |
0
     <% if comment.approved? -%>
0
- <%= link_to_remote 'Unapprove', :url => unapprove_article_comment_path(@article, comment) %> |
0
+ <%= link_to_remote 'Unapprove', :url => unapprove_article_comment_path(comment.article, comment) %> |
0
     <% else -%>
0
- <%= link_to_remote 'Approve', :url => approve_article_comment_path(@article, comment) %> |
0
+ <%= link_to_remote 'Approve', :url => approve_article_comment_path(comment.article, comment) %> |
0
     <% end -%>
0
- <%= link_to_remote 'Delete', :url => article_comment_path(@article, comment), :method => :delete %>
0
+ <%= link_to_remote 'Delete', :url => article_comment_path(comment.article, comment), :method => :delete %>
0
     </span>
0
   </li>
0
   <% end -%>
0
@@ -62,4 +62,4 @@ Comments for all articles
0
   if(comment) Element.addClassName(comment, 'focused');
0
   
0
 // ]]>
0
-</script>
0
\ No newline at end of file
0
+</script>

Comments

    No one has commented yet.