Guest User

Untitled

a guest
Jul 19th, 2018
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.24 KB | None | 0 0
  1. class Ticket < ActiveRecord::Base
  2. before_update :build_status_change_log
  3.  
  4. def build_status_change_log
  5. if status_changed? and status_was != status
  6. status_log_entries.build(:from => status_was, :to => status)
  7. end
  8. end
  9. end
Add Comment
Please, Sign In to add comment