1
0
Fork 0
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:
Trung Lê 2013-01-15 04:21:03 +00:00
parent 1fc294f988
commit 21df476f4c

View file

@ -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
)