Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Rails writing a record to a table
- class Record < ActiveRecord::Base
- after_save :add_status_chanage
- def add_status_change
- status = Status.new
- status.record_id = id
- status.field = field
- status.save
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment