diff options
Diffstat (limited to 'app/models/invite_code.rb')
-rw-r--r-- | app/models/invite_code.rb | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/app/models/invite_code.rb b/app/models/invite_code.rb index 8f69582..701b663 100644 --- a/app/models/invite_code.rb +++ b/app/models/invite_code.rb @@ -13,6 +13,8 @@ class InviteCode < CouchRest::Model::Base def initialize(attributes = {}, options = {}) super(attributes, options) + write_attribute('invite_code', CouponCode.generate) if new? + end def set_invite_code(code) |