From d31369e508a37a46e57146ef9157b0d140c3b073 Mon Sep 17 00:00:00 2001 From: Luc Donnet Date: Wed, 7 Jan 2015 21:59:44 +0100 Subject: Fix root_url in mailer by unauthenticated_root_url --- app/views/layouts/mailer.html.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'app') diff --git a/app/views/layouts/mailer.html.erb b/app/views/layouts/mailer.html.erb index 387221103..b8dea72e8 100644 --- a/app/views/layouts/mailer.html.erb +++ b/app/views/layouts/mailer.html.erb @@ -18,7 +18,7 @@
- Envoyé par <%= link_to root_url, "Chouette" %> + Envoyé par <%= link_to unauthenticated_root_url, "Chouette" %>
-- cgit v1.2.3 From 8a4bb1eb66da1140375071ea153b83946b07aa71 Mon Sep 17 00:00:00 2001 From: Michel Etienne Date: Thu, 8 Jan 2015 17:12:27 +0100 Subject: manage unauthenticated_root --- app/helpers/users_helper.rb | 4 ++-- app/views/devise/mailer/invitation_instructions.fr.html.erb | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'app') diff --git a/app/helpers/users_helper.rb b/app/helpers/users_helper.rb index 0ddea8356..a4347bd18 100644 --- a/app/helpers/users_helper.rb +++ b/app/helpers/users_helper.rb @@ -5,10 +5,10 @@ module UsersHelper end def user_default_avatar - return "#{root_url}#{image_path('icons/user.png')}" if Rails.application.config.relative_url_root.blank? + return "#{authenticated_root_url}#{image_path('icons/user.png')}" if Rails.application.config.relative_url_root.blank? relative_url_root = Rails.application.config.relative_url_root.gsub( /\//, '') - "#{root_url}#{image_path('icons/user.png')}". + "#{authenticated_root_url}#{image_path('icons/user.png')}". sub( Regexp.new("/#{relative_url_root}/#{relative_url_root}/"), "/#{relative_url_root}/"). sub( Regexp.new("/#{relative_url_root}//#{relative_url_root}/"), "/#{relative_url_root}/") end diff --git a/app/views/devise/mailer/invitation_instructions.fr.html.erb b/app/views/devise/mailer/invitation_instructions.fr.html.erb index 7ef4e6c99..c932763f2 100644 --- a/app/views/devise/mailer/invitation_instructions.fr.html.erb +++ b/app/views/devise/mailer/invitation_instructions.fr.html.erb @@ -1,6 +1,6 @@

Bonjour <%= @resource.email %>,

-

Ce message est une invitation pour accéder à <%= link_to nil, root_url %>, vous pouvez l'accepter en cliquant sur le lien suivant :

+

Ce message est une invitation pour accéder à <%= link_to nil, unauthenticated_root_url %>, vous pouvez l'accepter en cliquant sur le lien suivant :

<%= link_to "Accepter l'invitation", accept_invitation_url(@resource, :invitation_token => @resource.invitation_token) %>

-- cgit v1.2.3 From 283a9eed064a72c22c381c5025717b592c6cc4fb Mon Sep 17 00:00:00 2001 From: Michel Etienne Date: Fri, 9 Jan 2015 07:54:33 +0100 Subject: manage unauthenticated_root --- app/controllers/registrations_controller.rb | 2 +- app/views/devise/passwords/edit.html.erb | 2 +- app/views/devise/passwords/new.html.erb | 2 +- app/views/layouts/_user_links.erb | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) (limited to 'app') diff --git a/app/controllers/registrations_controller.rb b/app/controllers/registrations_controller.rb index b02d3217a..f563fbb03 100644 --- a/app/controllers/registrations_controller.rb +++ b/app/controllers/registrations_controller.rb @@ -6,7 +6,7 @@ def accept_user_creation if !Rails.application.config.accept_user_creation - redirect_to root_path + redirect_to unauthenticated_root_path return false else return true diff --git a/app/views/devise/passwords/edit.html.erb b/app/views/devise/passwords/edit.html.erb index 7b408a149..0c5ba77cf 100644 --- a/app/views/devise/passwords/edit.html.erb +++ b/app/views/devise/passwords/edit.html.erb @@ -9,7 +9,7 @@ <%= f.input :password_confirmation, :as => :password %>
- <%= link_to t("cancel"), root_path, :class => "btn btn-default" %> + <%= link_to t("cancel"), unauthenticated_root_path, :class => "btn btn-default" %> <%= f.button :submit, :value => t("devise.passwords.edit.commit"), :class => "btn-info" %>
<% end %> diff --git a/app/views/devise/passwords/new.html.erb b/app/views/devise/passwords/new.html.erb index 865805319..498e24c4c 100644 --- a/app/views/devise/passwords/new.html.erb +++ b/app/views/devise/passwords/new.html.erb @@ -6,7 +6,7 @@ <%= form.input :email, :as => :email, placeholder: 'user@domain.com' %>
- <%= link_to t("cancel"), root_path, :class => "btn btn-default" %> + <%= link_to t("cancel"), unauthenticated_root_path, :class => "btn btn-default" %> <%= form.button :submit, :value => t("devise.passwords.new.commit"), :class => "btn-info" %>
<% end %> diff --git a/app/views/layouts/_user_links.erb b/app/views/layouts/_user_links.erb index 404f52172..bd9196b3f 100644 --- a/app/views/layouts/_user_links.erb +++ b/app/views/layouts/_user_links.erb @@ -1,5 +1,5 @@