Skip to content
Browse files

Simplified the README example.

Instead of getting tricky with .tap, we should be keeping it readable.
  • Loading branch information...
1 parent 084be2a commit 0728035fffa78171e665d7035cd4dff33a5a5b34 @jrgifford jrgifford committed
Showing with 3 additions and 3 deletions.
  1. +3 −3 README.rdoc
View
6 README.rdoc
@@ -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 0728035

Please sign in to comment.
Something went wrong with that request. Please try again.