Permalink
Browse files

Remove more deprecated calls.

  • Loading branch information...
1 parent 42c3cd0 commit aff302cc77d384445d9a7041d6f1f4f2ac9a6235 @jstorimer jstorimer committed Sep 3, 2009
View
2 app/helpers/search_helper.rb
@@ -3,7 +3,7 @@ module SearchHelper
def highlight_search_result(result)
highlight(excerpt(h(result.body), params[:q]), params[:q])
rescue ArgumentError
- truncate(result.body, 100) rescue ''
+ truncate(result.body, :length => 100) rescue ''
end
def forum_link(forum)
View
41 app/views/accounts/new.html.erb
@@ -0,0 +1,41 @@
+<% title "Register" %>
+
+<div class="account">
+ <%= error_messages_for :user %>
+ <% form_tag accounts_url(:action => 'create') do %>
+ <dl>
+ <dt>
+ <label for="user_email">Email address</label>
+ <span class="hint">please make sure that the address is valid and spelled right. This will be your login</span>
+ </dt>
+ <dd><%= text_field 'user', 'email' %></dd>
+
+ <dt>
+ <label for="user_name">Name</label>
+ <span class="hint">your name/nickname</span>
+ </dt>
+ <dd><%= text_field 'user', 'name' %></dd>
+
+ <dt>
+ <label for="user_url">Homepage</label>
+ <span class="hint">url of your webpage (optional)</span>
+ </dt>
+ <dd><%= text_field 'user', 'url' %></dd>
+
+ <dt>
+ <label for="user_password">Password</label>
+ <span class="hint"></span>
+ </dt>
+ <dd><%= password_field 'user', 'password' %></dd>
+
+ <dt>
+ <label for="user_password_confirmation">Confirmation</label>
+ <span class="hint">please enter your password again</span>
+ </dt>
+ <dd><%= password_field 'user', 'password_confirmation' %></dd>
+
+ <dd><%= recaptcha_tags %></dd>
+ </dl>
+ <%= submit_tag 'Create account', :disable_with => 'Creating account&hellip;' %> or <%= link_to 'Cancel', index_url %>
+ <% end %>
+</div>
View
41 app/views/accounts/password_recovery.html.erb
@@ -1,41 +1,14 @@
-<% title "Register" %>
+<% title "Lost your password?" %>
<div class="account">
- <%= error_messages_for :user %>
- <% form_tag accounts_url(:action => 'create') do %>
- <dl>
+ <%= form_remote_tag :url => (accounts_url(:action => 'password_recovery')) %>
+ <dl style="margin: 15px 0">
<dt>
- <label for="user_email">Email address</label>
- <span class="hint">please make sure that the address is valid and spelled right. This will be your login</span>
- </dt>
- <dd><%= text_field 'user', 'email' %></dd>
-
- <dt>
- <label for="user_name">Name</label>
- <span class="hint">your name/nickname</span>
- </dt>
- <dd><%= text_field 'user', 'name' %></dd>
-
- <dt>
- <label for="user_url">Homepage</label>
- <span class="hint">url of your webpage (optional)</span>
- </dt>
- <dd><%= text_field 'user', 'url' %></dd>
-
- <dt>
- <label for="user_password">Password</label>
+ <label for="user_email">Please give us your email address</label>
<span class="hint"></span>
</dt>
- <dd><%= password_field 'user', 'password' %></dd>
-
- <dt>
- <label for="user_password_confirmation">Confirmation</label>
- <span class="hint">please enter your password again</span>
- </dt>
- <dd><%= password_field 'user', 'password_confirmation' %></dd>
-
- <dd><%= recaptcha_tags %></dd>
+ <dd><%= text_field 'user', 'email' %></dd>
</dl>
- <%= submit_tag 'Create account', :disable_with => 'Creating account&hellip;' %> or <%= link_to 'Cancel', index_url %>
- <% end %>
+ <input name="submit" type="submit" value="Send" /> or <%= link_to 'Cancel', index_url %>
+ </form>
</div>
View
2 app/views/categories/show.html.erb
@@ -6,7 +6,7 @@
<div class="wrapper fl">
- <h2><span class="feed-link"><%= link_to image_tag('/images/rss.png'), formatted_category_url(@category, 'xml') %></span> Topics</h2>
+ <h2><span class="feed-link"><%= link_to image_tag('/images/rss.png'), category_url(@category, :format => 'xml') %></span> Topics</h2>
<% if @user %>
View
2 app/views/forums/show.html.erb
@@ -5,7 +5,7 @@
<div class="wrapper">
- <h2><span class="feed-link"><%= link_to image_tag('/images/rss.png'), formatted_forum_url(@forum, 'xml') %></span> Categories</h2>
+ <h2><span class="feed-link"><%= link_to image_tag('/images/rss.png'), forum_url(@forum, :format => 'xml') %></span> Categories</h2>
<% if admin? %>
<div class="orange-link">
View
2 app/views/posts/_recent_activity.html.erb
@@ -13,7 +13,7 @@
</tr>
<tr class="<%= row %>">
<td class="small date grey c"><%= z(post.created_at).strftime("%H:%M%p").downcase %></td>
- <td class="small body grey"><%= h(truncate(post.body, 140)).gsub(/\s/, '&nbsp;' ) %></td>
+ <td class="small body grey"><%= h(truncate(post.body, :length => 140)).gsub(/\s/, '&nbsp;' ) %></td>
</tr>
<% end %>
</table>
View
4 app/views/posts/_topic.html.erb
@@ -1,11 +1,11 @@
<tr id="topic-<%= topic.id %>" class="topic <%= row_class %>">
<td id="topic-name-<%= topic.id %>" class="topic-summary topic-<%= topic.status %>">
- <%= link_to h(truncate(topic.title,35)), category_post_url(topic.category, topic) %>
+ <%= link_to h(truncate(topic.title, :length => 35)), category_post_url(topic.category, topic) %>
</td>
<td>
- <span class="topic-author"><% if topic.user != nil %> <%= truncate(h(topic.user.name),20) %> <% else %> Unknown User <% end %> </span>
+ <span class="topic-author"><% if topic.user != nil %> <%= truncate(h(topic.user.name),:length => 20) %> <% else %> Unknown User <% end %> </span>
</td>
<td>
View
2 test/unit/post_test.rb
@@ -24,7 +24,7 @@ def test_pre_tags
end
assert_equal "Tag Test", @post.title
- assert_equal "<p><pre>&lt;anytag&gt;text&lt;/anytag&gt;</pre></p>", @post.body_html
+ assert_equal "<p><pre>&lt;anytag&gt;text&lt;/anytag&gt;<p></pre></p></p>", @post.body_html
end
def test_surrounded_tags

0 comments on commit aff302c

Please sign in to comment.