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
1 changed files with 1 additions and 1 deletions

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
)