Skip to content

Instantly share code, notes, and snippets.

@Heavyblade
Created June 6, 2012 19:29
Show Gist options
  • Save Heavyblade/2884113 to your computer and use it in GitHub Desktop.
Save Heavyblade/2884113 to your computer and use it in GitHub Desktop.
def set_hostname
App.class_eval("@@hostname = '#{request.protocol}#{["test", "development"].include?(Rails.env) ? request.host_with_port : request.host}'")
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment