Defect #11284

Email missing route after change home route

Added by Sølve Monteiro almost 6 years ago. Updated almost 3 years ago.

Status:ClosedStart date:
Priority:NormalDue date:
Assignee:-% Done:

0%

Category:Email notifications
Target version:-
Resolution:Fixed Affected version:2.0.2

Description

I want to have the project list as the home page for my redmine site, so I changed the following in routes.rb from

  root :to => 'welcome#index', :as => 'home'

to
  root :to => 'projects#index', :as => 'home'

However, now email notification is not working. When I attempt to send a test-email I get the following error:

An error occurred while sending mail (No route matches {:controller=>"welcome"})

Any help would be greatly appreciated.

History

#1 Updated by Lukasz Gromanowski almost 6 years ago

Please check if code below is working for you (it's working for me)

# Just add this below 'root :to=> ...' line
match '/', :to => 'welcome#index', :as => 'home'

#2 Updated by Sølve Monteiro over 5 years ago

  • Status changed from New to Resolved

Thank you very much, this worked!

#3 Updated by Jan Niggemann (redmine.org team member) over 5 years ago

  • Status changed from Resolved to Closed
  • Resolution set to Fixed

#4 Updated by Brian Kirkpatrick almost 3 years ago

If you are implementing this solution with a more recent version of Redmine (or Rails, specifically), it appears that you will need to replace the ":as" option with a "via" argument (per http://guides.rubyonrails.org/routing.html):

# Just add this below 'root :to=> ...' line
match '/', :to => 'welcome#index', via: :all

Also available in: Atom PDF