mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Use Rails 4 find_by in README [ci skip]
This commit is contained in:
parent
1fc294f988
commit
21df476f4c
1 changed files with 1 additions and 1 deletions
|
@ -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 a new issue