bjhess (owner)

Revisions

gist: 219951 Download_button fork
public
Public Clone URL: git://gist.github.com/219951.git
Embed All Files: show embed
concerned_with.rb #
1
2
3
4
5
6
7
8
9
10
11
##
# Our Mailer is TFB, and thus I've brought the concerned_with pattern in to kick ass.
# Adapted from: http://paulbarry.com/articles/2008/08/30/concerned-with-skinny-controller-skinny-model
#
class << ActionMailer::Base
  def concerned_with(*concerns)
    concerns.each do |concern|
      require_dependency "#{name.underscore}/#{concern}_mailer"
    end
  end
end