diff options
Diffstat (limited to 'app/controllers')
-rw-r--r-- | app/controllers/admin_request_controller.rb | 6 | ||||
-rw-r--r-- | app/controllers/admin_user_controller.rb | 4 | ||||
-rw-r--r-- | app/controllers/api_controller.rb | 4 | ||||
-rw-r--r-- | app/controllers/public_body_controller.rb | 2 | ||||
-rw-r--r-- | app/controllers/user_controller.rb | 2 |
5 files changed, 9 insertions, 9 deletions
diff --git a/app/controllers/admin_request_controller.rb b/app/controllers/admin_request_controller.rb index c631c88f9..49f40b098 100644 --- a/app/controllers/admin_request_controller.rb +++ b/app/controllers/admin_request_controller.rb @@ -297,12 +297,12 @@ class AdminRequestController < AdminController end # Bejeeps, look, sometimes a URL is something that belongs in a controller, jesus. - # XXX hammer this square peg into the round MVC hole - should be calling main_url(upload_response_url()) + # XXX hammer this square peg into the round MVC hole post_redirect = PostRedirect.new( - :uri => main_url(upload_response_url(:url_title => info_request.url_title, :only_path => true)), + :uri => upload_response_url(:url_title => info_request.url_title), :user_id => user.id) post_redirect.save! - url = main_url(confirm_url(:email_token => post_redirect.email_token, :only_path => true)) + url = confirm_url(:email_token => post_redirect.email_token) flash[:notice] = 'Send "' + name + '" <<a href="mailto:' + email + '">' + email + '</a>> this URL: <a href="' + url + '">' + url + "</a> - it will log them in and let them upload a response to this request.".html_safe redirect_to request_admin_url(info_request) diff --git a/app/controllers/admin_user_controller.rb b/app/controllers/admin_user_controller.rb index 52f7f330c..1478cb21f 100644 --- a/app/controllers/admin_user_controller.rb +++ b/app/controllers/admin_user_controller.rb @@ -72,9 +72,9 @@ class AdminUserController < AdminController def login_as @admin_user = User.find(params[:id]) # check user does exist - post_redirect = PostRedirect.new( :uri => main_url(user_path(@admin_user)), :user_id => @admin_user.id, :circumstance => "login_as" ) + post_redirect = PostRedirect.new( :uri => user_url(@admin_user), :user_id => @admin_user.id, :circumstance => "login_as" ) post_redirect.save! - url = main_url(confirm_url(:email_token => post_redirect.email_token, :only_path => true)) + url = confirm_url(:email_token => post_redirect.email_token) redirect_to url end diff --git a/app/controllers/api_controller.rb b/app/controllers/api_controller.rb index aa1ea632f..5d8ceb888 100644 --- a/app/controllers/api_controller.rb +++ b/app/controllers/api_controller.rb @@ -220,7 +220,7 @@ class ApiController < ApplicationController :event_id => event.id, :created_at => event.created_at.iso8601, :event_type => event.event_type, - :request_url => main_url(request_path(request)), + :request_url => request_url(request), :request_email => request.incoming_email, :title => request.title, :body => event.outgoing_message.body, @@ -228,7 +228,7 @@ class ApiController < ApplicationController :user_name => request.user_name, } if request.user - this_event[:user_url] = main_url(user_path(request.user)) + this_event[:user_url] = user_url(request.user) end @event_data.push(this_event) diff --git a/app/controllers/public_body_controller.rb b/app/controllers/public_body_controller.rb index 8a4a65820..e304f0776 100644 --- a/app/controllers/public_body_controller.rb +++ b/app/controllers/public_body_controller.rb @@ -31,7 +31,7 @@ class PublicBodyController < ApplicationController set_last_body(@public_body) - top_url = main_url("/") + top_url = frontpage_url @searched_to_send_request = false referrer = request.env['HTTP_REFERER'] if !referrer.nil? && referrer.match(%r{^#{top_url}search/.*/bodies$}) diff --git a/app/controllers/user_controller.rb b/app/controllers/user_controller.rb index 22d5571ae..fc8b6e014 100644 --- a/app/controllers/user_controller.rb +++ b/app/controllers/user_controller.rb @@ -422,7 +422,7 @@ class UserController < ApplicationController ContactMailer.deliver_user_message( @user, @recipient_user, - main_url(user_path(@user)), + user_url(@user), params[:contact][:subject], params[:contact][:message] ) |