Skip to content

Instantly share code, notes, and snippets.

@reidmix
Created October 16, 2009 16:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save reidmix/211886 to your computer and use it in GitHub Desktop.
Save reidmix/211886 to your computer and use it in GitHub Desktop.
ActionMailer::Base.class_eval do
adv_attr_accessor :layout
private
def render_with_layout_option opts
# test for nil allows for layout => false
opts[:layout] = self.layout unless self.layout.nil?
render_without_layout_option opts
end
alias_method_chain :render, :layout_option
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment