eac/action_mailer-enqueable — pull request #2 by grosser (2013-12-28 00:58:15+00:00)
Title: rails 32

@eac
- return a proxy from self.foo
- create on .create
- enqueue on .deliver

classic will hook into this by sending the old deliver_ / create_ methods to it, so we should have a smooth transition

```

alias_method :method_missing_without_deprecated, :method_missing

# convert old create/deliver_foo to foo().deliver (.create is handled via action_mailer-enqueable)
def method_missing(name, *args, &block)
if match = /^(create|deliver)_([_a-z]\w*)/.match(name.to_s)
method_missing_without_deprecated(match[2], *args, &block).send(match[1])
else
method_missing_without_deprecated(name, *args, &block)
end
end
```