Guest User

Untitled

a guest
Jun 18th, 2018
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.29 KB | None | 0 0
  1. class MailInbox < ActiveRecord::Base
  2. belongs_to :inbox
  3. delegate :name, :description, :to => :inbox
  4. after_initialize :initialize_inbox
  5. after_save :save_inbox
  6.  
  7. protected
  8. def initialize_inbox
  9. puts "building inbox"
  10. build_inbox
  11. end
  12.  
  13. def save_inbox
  14. inbox.save
  15. end
  16.  
  17. end
Add Comment
Please, Sign In to add comment