Created
February 16, 2017 09:10
-
-
Save strika/31589aa7c65fe711b373e4cc672ef14d to your computer and use it in GitHub Desktop.
Module for using routes in Services and other "non-rails" classes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module Routing | |
extend ActiveSupport::Concern | |
include Rails.application.routes.url_helpers | |
include Aligni::HostHelper | |
included do | |
def default_url_options | |
ActionMailer::Base.default_url_options | |
end | |
def controller | |
nil | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment