Guest User

Untitled

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