Created
October 24, 2008 17:02
-
-
Save trek/19494 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Customer < ActiveRecord::Base | |
| before_destroy :log_deletion, :email_admin | |
| private | |
| def log_deletion | |
| logger.info("customer id:#{self.id} was just deleted") | |
| end | |
| def email_admin | |
| ... | |
| end | |
| end | |
| CustomersController < ApplicationController | |
| def destroy | |
| Customer.destroy(parmas[:id]) | |
| end | |
| end | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment