Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class Ticket < ActiveRecord::Base
- before_update :build_status_change_log
- def build_status_change_log
- if status_changed? and status_was != status
- status_log_entries.build(:from => status_was, :to => status)
- end
- end
- end
Add Comment
Please, Sign In to add comment