Skip to content

Commit

Permalink
Added emails with subdomains as configured in fortuity's original
Browse files Browse the repository at this point in the history
  • Loading branch information
berislavbabic committed Sep 30, 2010
1 parent 01de78a commit b232400
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions app/controllers/application_controller.rb
Expand Up @@ -3,6 +3,7 @@ class ApplicationController < ActionController::Base
protect_from_forgery
helper_method :current_subdomain, :check_my_subdomain
before_filter :current_subdomain
before_filter :set_mailer_url_options


def current_subdomain
Expand Down
3 changes: 3 additions & 0 deletions app/helpers/url_helper.rb
Expand Up @@ -13,4 +13,7 @@ def url_for(options = nil)
end
super
end
def set_mailer_url_options
ActionMailer::Base.default_url_options[:host] = with_subdomain(request.subdomains.first)
end
end

0 comments on commit b232400

Please sign in to comment.