mirror of https://github.com/rails/rails
Use Rails 4 find_by in README [ci skip]
This commit is contained in:
parent
1fc294f988
commit
21df476f4c
|
@ -98,7 +98,7 @@ Example:
|
|||
|
||||
class Mailman < ActionMailer::Base
|
||||
def receive(email)
|
||||
page = Page.find_by_address(email.to.first)
|
||||
page = Page.find_by(address: email.to.first)
|
||||
page.emails.create(
|
||||
subject: email.subject, body: email.body
|
||||
)
|
||||
|
|
Loading…
Reference in New Issue