Permalink
Browse files

Merge pull request #76 from jrgifford/fix-readme-example

Simplified the README example.
  • Loading branch information...
2 parents 084be2a + 0728035 commit 71078ecbc5db59a16208c4e0fe1282e0159bb5c3 @steveklabnik steveklabnik committed Jan 7, 2013
Showing with 3 additions and 3 deletions.
  1. +3 −3 README.rdoc
View
@@ -15,9 +15,9 @@ In addition, parameters can be marked as required and flow through a predefined
# it'll raise a ActionController::MissingParameter exception, which will get caught by
# ActionController::Base and turned into that 400 Bad Request reply.
def update
- redirect_to current_account.people.find(params[:id]).tap { |person|
- person.update_attributes!(person_params)
- }
+ person = current_account.people.find(params[:id])
+ person.update(person_params)
+ redirect_to person
end
private

0 comments on commit 71078ec

Please sign in to comment.