Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def update
- book = Book.find(params[:id])
- book.update_attributes(params[:book])
- rescue ActiveRecord::StaleObjectError => e
- flash[:notice] =
- "The book was modified while you were editing it. Please retry..."
- redirect :action => 'edit'
- end
Add Comment
Please, Sign In to add comment