diff options
author | ankonym <ankonym@gmail.com> | 2015-10-08 17:00:04 +0200 |
---|---|---|
committer | ankonym <ankonym@gmail.com> | 2015-10-13 11:46:02 +0200 |
commit | 2541d08598c2bc4ce04f63b4ed4056ffb044a596 (patch) | |
tree | c66fc44b1e61ad57051ba99b067bc6c2dc83d799 /app | |
parent | 76cc852527a117e1cbff7f2ea80afa9033abb422 (diff) |
Fix the InviteCode initialize method so leap_web tests stay green
Diffstat (limited to 'app')
-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) |