Skip to content

Instantly share code, notes, and snippets.

@seangaffney
Created June 10, 2011 03:56
Show Gist options
  • Save seangaffney/1018203 to your computer and use it in GitHub Desktop.
Save seangaffney/1018203 to your computer and use it in GitHub Desktop.
Setting mailer path in Rails 3
class ApplicationController < ActionController::Base
protect_from_forgery
before_filter :mailer_set_url_options
def mailer_set_url_options
ActionMailer::Base.default_url_options[:host] = request.host_with_port
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment