Skip to content

Instantly share code, notes, and snippets.

@nowk
Created November 27, 2012 19:55
Show Gist options
  • Save nowk/4156613 to your computer and use it in GitHub Desktop.
Save nowk/4156613 to your computer and use it in GitHub Desktop.
Dynamic default url options
class ApplicationController < ActionController::Base
protect_from_forgery # See ActionController::RequestForgeryProtection for details
before_filter lambda {
ActionMailer::Base.default_url_options = {:host => request.host_with_port}
}
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment