Skip to content

Commit

Permalink
Generate random avatar on initialize
Browse files Browse the repository at this point in the history
  • Loading branch information
dmytroyarmak committed Feb 3, 2014
1 parent ca4f9c4 commit 01d4b49
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions app/js/models/contact.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,9 @@ ContactManager.Models.Contact = Backbone.Model.extend({
tel: null,
email: null,
avatar: null
},

initialize: function() {
this.set('avatar', _.random(1, 15) + '.jpg');
}
});

0 comments on commit 01d4b49

Please sign in to comment.