Sha256: c915527db2537b7b971d1fb8f224aa455c4246afb353cd7fd87e33834028b07d

Contents?: true

Size: 447 Bytes

Versions: 1

Compression:

Stored size: 447 Bytes

Contents

module SubdomainRoutes
  module MailerMethods
    def self.included(base)
      base.alias_method_chain :create!, :subdomains
    end
    
    def create_with_subdomains!(*args)
      ActionController::Routing::Routes.subdomain_procs.flush! unless SubdomainRoutes::Config.manual_flush
      create_without_subdomains!(*args)
    end
  end
end

if defined? ActionMailer::Base
  ActionMailer::Base.send :include, SubdomainRoutes::MailerMethods
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
mholling-subdomain_routes-0.1.0 lib/subdomain_routes/mailer.rb