public
Fork of halorgium/mephisto
Description: A refactored Mephisto that has multiple spam detection engines.
Homepage: http://mephistoblog.com/
Clone URL: git://github.com/francois/mephisto.git
fix url_for calls with symbolized controllers/actions.

git-svn-id: http://svn.techno-weenie.net/projects/mephisto/trunk@2797 
567b1171-46fb-0310-a4c9-b4bef9110e78
technoweenie (author)
Sat Mar 10 23:48:46 -0800 2007
commit  128718e5c318b2aa0fab360996feab80ad799a40
tree    8e996df7947f5e2a31dfc650821dfe51691f7400
parent  15fdd8615cec1aeca1b42d70baf83a4306c2f230
...
1
2
3
 
4
5
6
...
95
96
97
98
 
99
100
101
...
1
2
 
3
4
5
6
...
95
96
97
 
98
99
100
101
0
@@ -1,6 +1,6 @@
0
 class MephistoController < ApplicationController
0
   layout nil
0
- session :new_session => false
0
+ session :off
0
   caches_page_with_references :dispatch
0
   cache_sweeper :comment_sweeper
0
 
0
@@ -95,7 +95,7 @@ class MephistoController < ApplicationController
0
       render_liquid_template_for(:search, 'articles' => @articles,
0
                                           'previous_page' => paged_search_url_for(@article_pages.current.previous),
0
                                           'next_page' => paged_search_url_for(@article_pages.current.next),
0
- 'search_string' => params[:q],
0
+ 'search_string' => CGI::escapeHTML(params[:q]),
0
                                           'search_count' => search_count,
0
                                           'section' => @section)
0
       @skip_caching = true
...
6
7
8
9
 
10
11
12
...
6
7
8
 
9
10
11
12
0
@@ -6,7 +6,7 @@ class UserMailer < ActionMailer::Base
0
   def forgot_password(user)
0
     setup_email(user)
0
     @subject += 'Request to change your password'
0
- @body[:url] = url_for :controller => :account, :action => :activate, :id => user.token
0
+ @body[:url] = url_for :controller => 'account', :action => 'activate', :id => user.token
0
   end
0
 
0
   protected
...
1
2
 
3
4
5
...
1
 
2
3
4
5
0
@@ -1,5 +1,5 @@
0
 <div class="little-box">
0
-<% form_tag({:controller=>:account, :action=>:login}, { :id => 'login_form' }) do -%>
0
+<% form_tag({:controller=>'account', :action=>'account'}, { :id => 'login_form' }) do -%>
0
   <dl>
0
     <dt><%= label_tag 'login', 'Login' %></dt>
0
     <dd><%= text_field_tag 'login', params[:login], :class => 'big' %></dd>
...
22
23
24
25
 
26
27
28
...
22
23
24
 
25
26
27
28
0
@@ -22,7 +22,7 @@
0
       <div id="optgroup" style="display: none">
0
         <ul id="options">
0
         <% unless @article.new_record? -%>
0
- <li><%= link_to 'Edit this article', :action => :edit, :id => @article, :version => nil %></li>
0
+ <li><%= link_to 'Edit this article', :action => 'edit', :id => @article, :version => nil %></li>
0
         <% end -%>
0
         <% if @article.comments.any? && controller.action_name != 'comments' -%>
0
           <li><%= link_to "View comments", :controller => 'articles', :action => 'comments', :id => @article %></li>
...
58
59
60
61
 
62
63
64
...
58
59
60
 
61
62
63
64
0
@@ -58,7 +58,7 @@
0
 <!-- begin pagination -->
0
 <div id="pagination">
0
 <% if @article_pages.page_count > 1 -%>
0
-Pages: <strong><%= pagination_links @article_pages, :params => { :action => :index } %></strong>
0
+Pages: <strong><%= pagination_links @article_pages, :params => { :action => 'index' } %></strong>
0
 <% end -%>
0
 </div>
0
 <!-- /end pagination -->
...
29
30
31
32
 
33
34
35
...
29
30
31
 
32
33
34
35
0
@@ -29,6 +29,6 @@
0
 
0
 <% if @asset_pages.page_count > 1 %>
0
   <div id="pagination">
0
- Pages: <strong><%= pagination_remote_links @asset_pages, :params => { :action => :index } %></strong>
0
+ Pages: <strong><%= pagination_remote_links @asset_pages, :params => { :action => 'index' } %></strong>
0
   </div>
0
 <% end %>
0
\ No newline at end of file
...
2
3
4
5
 
6
7
8
...
28
29
30
31
 
32
33
34
35
...
2
3
4
 
5
6
7
8
...
28
29
30
 
31
32
33
34
35
0
@@ -2,7 +2,7 @@
0
 <!-- begin cached pages list -->
0
 <div class="pages">
0
 <% if @cached_page_pages.page_count > 1 %>
0
-Pages: <strong><%= pagination_remote_links @cached_page_pages, :params => { :action => :index } %></strong>
0
+Pages: <strong><%= pagination_remote_links @cached_page_pages, :params => { :action => 'index' } %></strong>
0
 <% end %>
0
 </div>
0
 <h2>Cached Pages</h2><br/>
0
@@ -28,7 +28,7 @@ Pages: <strong><%= pagination_remote_links @cached_page_pages, :params => { :act
0
 <!-- begin pagination -->
0
 <div id="pagination">
0
 <% if @cached_page_pages.page_count > 1 %>
0
-Pages: <strong><%= pagination_links @cached_page_pages, :params => { :action => :index } %></strong>
0
+Pages: <strong><%= pagination_links @cached_page_pages, :params => { :action => 'index' } %></strong>
0
 <% end %>
0
 </div>
0
 <!-- /end pagination -->
0
\ No newline at end of file
...
16
17
18
19
 
20
21
22
...
16
17
18
 
19
20
21
22
0
@@ -16,7 +16,7 @@
0
 <ul class="pagelist commentlist">
0
   <% @comments.reverse.each_with_index do |comment, i| -%>
0
   <li class="event-comment<%= " shade" if (i % 2 > 0) %>" id="comment-<%= comment.id %>">
0
- <h3><a name="comment-<%= comment.id %>"></a> <%= link_to comment.article.title, :controller => 'articles', :action => :edit, :id => comment.article %></h3>
0
+ <h3><a name="comment-<%= comment.id %>"></a> <%= link_to comment.article.title, :controller => 'articles', :action => 'edit', :id => comment.article %></h3>
0
     <blockquote><p>"<%= truncate strip_tags(comment.body), 255 %>"</p></blockquote>
0
     <span class="meta">
0
       <cite>&mdash; <%= author_link_for comment %><%= %( (#{comment.author_email})) unless comment.author_email.blank? %></cite>
...
1
2
3
4
 
5
6
7
...
1
2
3
 
4
5
6
7
0
@@ -1,7 +1,7 @@
0
 <tr class="published" >
0
   <td class="published">
0
   <% if plugin.configurable? -%>
0
- <%= link_to plugin.path, :action => :show, :id => plugin.path %>
0
+ <%= link_to plugin.path, :action => 'show', :id => plugin.path %>
0
   <% else -%>
0
     <%=h plugin.path %>
0
   <% end -%>
...
23
24
25
26
 
27
28
29
 
30
31
32
33
34
35
36
 
37
38
39
...
23
24
25
 
26
27
28
 
29
30
31
32
33
34
35
 
36
37
38
39
0
@@ -23,17 +23,17 @@
0
 <div id="page-nav">
0
   <ul id="act-nav" class="clear">
0
   <li>
0
- <%= link_to 'Restore Defaults', :action => :destroy, :id => @plugin.plugin_name %>
0
+ <%= link_to 'Restore Defaults', :action => 'destroy', :id => @plugin.plugin_name %>
0
   </li>
0
   <li>
0
- <%= link_to 'Index', :action => :index %>
0
+ <%= link_to 'Index', :action => 'index' %>
0
   </li>
0
   </ul>
0
 </div>
0
 <% end %>
0
 
0
 <% content_for :form do -%>
0
- <%= form_tag({:action => :update, :id => @plugin.plugin_name}, {:id => 'plugin-config-form'}) %>
0
+ <%= form_tag({:action => 'update', :id => @plugin.plugin_name}, {:id => 'plugin-config-form'}) %>
0
 <% end -%>
0
 
0
 <% if @plugin.default_options.any? -%>
...
23
24
25
26
 
27
28
29
...
23
24
25
 
26
27
28
29
0
@@ -23,7 +23,7 @@ class UserMailerTest < Test::Unit::TestCase
0
     user = users(:quentin)
0
     response = UserMailer.deliver_forgot_password(user)
0
     assert_equal user.email, response.to[0]
0
- assert_match /#{url_for :controller => :account, :action => :activate, :id => user.token}/, response.body
0
+ assert_match /#{url_for :controller => 'account', :action => 'activate', :id => user.token}/, response.body
0
   end
0
 
0
   private

Comments

    No one has commented yet.