Guest User

Untitled

a guest
May 25th, 2018
96
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.25 KB | None | 0 0
  1. def update
  2. book = Book.find(params[:id])
  3. book.update_attributes(params[:book])
  4. rescue ActiveRecord::StaleObjectError => e
  5. flash[:notice] =
  6. "The book was modified while you were editing it. Please retry..."
  7. redirect :action => 'edit'
  8. end
Add Comment
Please, Sign In to add comment