提交 d040b3de 编写于 作者: G Guillermo Iguaran

Merge pull request #8947 from joneslee85/patch-1

Use Rails 4 find_by in README [ci skip]
...@@ -98,7 +98,7 @@ Example: ...@@ -98,7 +98,7 @@ Example:
class Mailman < ActionMailer::Base class Mailman < ActionMailer::Base
def receive(email) def receive(email)
page = Page.find_by_address(email.to.first) page = Page.find_by(address: email.to.first)
page.emails.create( page.emails.create(
subject: email.subject, body: email.body subject: email.subject, body: email.body
) )
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册