Guest User

Untitled

a guest
Apr 28th, 2012
25
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.23 KB | None | 0 0
  1. Rails writing a record to a table
  2. class Record < ActiveRecord::Base
  3.  
  4. after_save :add_status_chanage
  5.  
  6. def add_status_change
  7. status = Status.new
  8. status.record_id = id
  9. status.field = field
  10. status.save
  11. end
  12.  
  13. end
Advertisement
Add Comment
Please, Sign In to add comment