aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHenare Degan <henare.degan@gmail.com>2012-12-10 01:40:45 +1100
committerHenare Degan <henare.degan@gmail.com>2012-12-11 11:09:39 +1100
commitb2f28a42f65c473bbf50bb98c2492518e87c10c4 (patch)
tree4330e3b1b1c069bffaaa592268669a82238c261c
parent273392dd8318230b2cc1070dd3c17abb8851c4b9 (diff)
Using #request_uri is deprecated
-rw-r--r--app/controllers/application_controller.rb2
-rw-r--r--app/views/help/contact.rhtml2
-rw-r--r--app/views/layouts/default.rhtml6
-rw-r--r--app/views/request/_describe_state.rhtml2
-rw-r--r--app/views/request/_hidden_correspondence.rhtml6
-rw-r--r--app/views/request/hidden.rhtml2
-rw-r--r--app/views/request/new_please_describe.rhtml2
-rw-r--r--app/views/request/show.rhtml2
-rw-r--r--app/views/track/_tracking_links.rhtml2
-rw-r--r--app/views/user/show.rhtml8
10 files changed, 17 insertions, 17 deletions
diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb
index b22adf660..3206df1d2 100644
--- a/app/controllers/application_controller.rb
+++ b/app/controllers/application_controller.rb
@@ -240,7 +240,7 @@ class ApplicationController < ActionController::Base
# Check the user is logged in
def authenticated?(reason_params)
unless session[:user_id]
- post_redirect = PostRedirect.new(:uri => request.request_uri, :post_params => params,
+ post_redirect = PostRedirect.new(:uri => request.fullpath, :post_params => params,
:reason_params => reason_params)
post_redirect.save!
# 'modal' controls whether the sign-in form will be displayed in the typical full-blown
diff --git a/app/views/help/contact.rhtml b/app/views/help/contact.rhtml
index fab5017b8..385c24a62 100644
--- a/app/views/help/contact.rhtml
+++ b/app/views/help/contact.rhtml
@@ -46,7 +46,7 @@
<p>
<label class="form_label" for="contact_name">Your name:</label>
<%= f.text_field :name, :size => 20 %>
- (or <%= link_to "sign in", signin_url(:r => request.request_uri) %>)
+ (or <%= link_to "sign in", signin_url(:r => request.fullpath) %>)
</p>
<p>
diff --git a/app/views/layouts/default.rhtml b/app/views/layouts/default.rhtml
index 6ac7064a7..28d099984 100644
--- a/app/views/layouts/default.rhtml
+++ b/app/views/layouts/default.rhtml
@@ -32,7 +32,7 @@
<% end %>
<% end %>
<% if @has_json %>
- <link rel="alternate" type="application/json" title="JSON version of this page" href="<%=h main_url(request.request_uri, '.json') %>">
+ <link rel="alternate" type="application/json" title="JSON version of this page" href="<%=h main_url(request.fullpath, '.json') %>">
<% end %>
<% if @no_crawl %>
@@ -92,9 +92,9 @@
<% end %>
- <%= link_to _("Sign out"), signout_url(:r => request.request_uri) %>
+ <%= link_to _("Sign out"), signout_url(:r => request.fullpath) %>
<% else %>
- <%= link_to _("Sign in or sign up"), signin_url(:r => request.request_uri) %>
+ <%= link_to _("Sign in or sign up"), signin_url(:r => request.fullpath) %>
<% end %>
</div>
<% end %>
diff --git a/app/views/request/_describe_state.rhtml b/app/views/request/_describe_state.rhtml
index 5b6004e81..f70e5ed8b 100644
--- a/app/views/request/_describe_state.rhtml
+++ b/app/views/request/_describe_state.rhtml
@@ -108,7 +108,7 @@
<%= _('We don\'t know whether the most recent response to this request contains
information or not
&ndash;
- if you are {{user_link}} please <a href="{{url}}">sign in</a> and let everyone know.',:user_link=>user_link(@info_request.user), :url=>signin_url(:r => request.request_uri)) %>
+ if you are {{user_link}} please <a href="{{url}}">sign in</a> and let everyone know.',:user_link=>user_link(@info_request.user), :url=>signin_url(:r => request.fullpath)) %>
<% end %>
<% end %>
diff --git a/app/views/request/_hidden_correspondence.rhtml b/app/views/request/_hidden_correspondence.rhtml
index 0ea6fcddd..3f80e4c4d 100644
--- a/app/views/request/_hidden_correspondence.rhtml
+++ b/app/views/request/_hidden_correspondence.rhtml
@@ -8,20 +8,20 @@
<div class="correspondence" id="incoming-<%=incoming_message.id.to_s%>">
<p>
<%= _('This response has been hidden. See annotations to find out why.
- If you are the requester, then you may <a href="%s">sign in</a> to view the response.') % [signin_url(:r => request.request_uri)] %>
+ If you are the requester, then you may <a href="%s">sign in</a> to view the response.') % [signin_url(:r => request.fullpath)] %>
</p>
</div>
<% elsif [ 'sent', 'followup_sent', 'resent', 'followup_resent' ].include?(info_request_event.event_type) %>
<div class="correspondence" id="outgoing-<%=outgoing_message.id.to_s%>">
<p>
<%= _('This outgoing message has been hidden. See annotations to
- find out why. If you are the requester, then you may <a href="%s">sign in</a> to view the response.') % [signin_url(:r => request.request_uri)] %>
+ find out why. If you are the requester, then you may <a href="%s">sign in</a> to view the response.') % [signin_url(:r => request.fullpath)] %>
</p>
</div>
<% elsif info_request_event.event_type == 'comment' %>
<div class="comment_in_request" id="comment-<%=comment.id.to_s%>">
<p><%= _('This comment has been hidden. See annotations to
- find out why. If you are the requester, then you may <a href="%s">sign in</a> to view the response.') % [signin_url(:r => request.request_uri)]%>
+ find out why. If you are the requester, then you may <a href="%s">sign in</a> to view the response.') % [signin_url(:r => request.fullpath)]%>
</p>
</div>
<% end %>
diff --git a/app/views/request/hidden.rhtml b/app/views/request/hidden.rhtml
index a4afb63c6..5a4a1eff9 100644
--- a/app/views/request/hidden.rhtml
+++ b/app/views/request/hidden.rhtml
@@ -12,7 +12,7 @@ various reasons why we might have done this, sorry we can\'t be more specific he
</p>
<% if @info_request.prominence == 'requester_only' %>
<p>
- <%= _('If you are the requester, then you may <a href="%s">sign in</a> to view the request.') % [signin_url(:r => request.request_uri)] %>
+ <%= _('If you are the requester, then you may <a href="%s">sign in</a> to view the request.') % [signin_url(:r => request.fullpath)] %>
</p>
<% end %>
diff --git a/app/views/request/new_please_describe.rhtml b/app/views/request/new_please_describe.rhtml
index ce80f51f0..d4bad4197 100644
--- a/app/views/request/new_please_describe.rhtml
+++ b/app/views/request/new_please_describe.rhtml
@@ -13,7 +13,7 @@ if they are successful yet or not.') %>
</ul>
<p>
- <%= _('When you\'re done, <strong>come back here</strong>, <a href="%s">reload this page</a> and file your new request.') % [request.request_uri] %>
+ <%= _('When you\'re done, <strong>come back here</strong>, <a href="%s">reload this page</a> and file your new request.') % [request.fullpath] %>
</p>
<p>
diff --git a/app/views/request/show.rhtml b/app/views/request/show.rhtml
index 7aff1aeab..7c2b95216 100644
--- a/app/views/request/show.rhtml
+++ b/app/views/request/show.rhtml
@@ -106,7 +106,7 @@
<%= _('The request is <strong>waiting for clarification</strong>.') %>
<% if !@info_request.is_external? %>
<%= _('If you are {{user_link}}, please',:user_link=>user_link_for_request(@info_request)) %>
- <%= link_to _("sign in"), signin_url(:r => request.request_uri) %> <%= _('to send a follow up message.') %>
+ <%= link_to _("sign in"), signin_url(:r => request.fullpath) %> <%= _('to send a follow up message.') %>
<% end %>
<% end %>
<% elsif @status == 'gone_postal' %>
diff --git a/app/views/track/_tracking_links.rhtml b/app/views/track/_tracking_links.rhtml
index 3ba9d15e2..bd0b6e1a3 100644
--- a/app/views/track/_tracking_links.rhtml
+++ b/app/views/track/_tracking_links.rhtml
@@ -9,7 +9,7 @@
<% elsif existing_track %>
<p><%= track_thing.params[:verb_on_page_already] %></p>
<div class="feed_link feed_link_<%=location%>">
- <%= link_to _("Unsubscribe"), {:controller => 'track', :action => 'update', :track_id => existing_track.id, :track_medium => "delete", :r => request.request_uri}, :class => "link_button_green" %>
+ <%= link_to _("Unsubscribe"), {:controller => 'track', :action => 'update', :track_id => existing_track.id, :track_medium => "delete", :r => request.fullpath}, :class => "link_button_green" %>
</div>
<% elsif track_thing %>
<div class="feed_link feed_link_<%=location%>">
diff --git a/app/views/user/show.rhtml b/app/views/user/show.rhtml
index 12a9d3f74..df92627b7 100644
--- a/app/views/user/show.rhtml
+++ b/app/views/user/show.rhtml
@@ -97,7 +97,7 @@
<% if not @is_you %>
<p id="user_not_logged_in">
- <%= _('<a href="%s">Sign in</a> to change password, subscriptions and more ({{user_name}} only)',:user_name=>h(@display_user.name)) % [signin_url(:r => request.request_uri)]%>
+ <%= _('<a href="%s">Sign in</a> to change password, subscriptions and more ({{user_name}} only)',:user_name=>h(@display_user.name)) % [signin_url(:r => request.fullpath)]%>
</p>
<% end %>
</div>
@@ -186,7 +186,7 @@
<%=TrackThing.track_type_description(@track_things[0].track_type)%>
<%= hidden_field_tag 'track_type', @track_things[0].track_type %>
<%= hidden_field_tag 'user', @display_user.id %>
- <%= hidden_field_tag 'r', request.request_uri %>
+ <%= hidden_field_tag 'r', request.fullpath %>
<% if @track_things.size > 1 %>
<%= submit_tag _('unsubscribe all') %>
<% end %>
@@ -200,7 +200,7 @@
<%=TrackThing.track_type_description(track_type)%>
<%= hidden_field_tag 'track_type', track_type %>
<%= hidden_field_tag 'user', @display_user.id %>
- <%= hidden_field_tag 'r', request.request_uri %>
+ <%= hidden_field_tag 'r', request.fullpath %>
<% if track_things.size > 1 %>
<%= submit_tag _('unsubscribe all')%>
<% end %>
@@ -215,7 +215,7 @@
<div>
<%= track_thing.params[:list_description] %>
<%= hidden_field_tag 'track_medium', "delete", { :id => 'track_medium_' + track_thing.id.to_s } %>
- <%= hidden_field_tag 'r', request.request_uri, { :id => 'r_' + track_thing.id.to_s } %>
+ <%= hidden_field_tag 'r', request.fullpath, { :id => 'r_' + track_thing.id.to_s } %>
<%= submit_tag _('unsubscribe') %>
</div>
<% end %>