Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class MailInbox < ActiveRecord::Base
- belongs_to :inbox
- delegate :name, :name=, :description, :description=, :to => :inbox
- after_save :save_inbox
- after_destroy :destroy_inbox
- protected
- def after_initialize
- build_inbox
- end
- def save_inbox
- inbox.save
- end
- def destroy_inbox
- inbox.destroy
- end
- end
Add Comment
Please, Sign In to add comment