Refactor random verbs, phrases, and compliments so that only the resources controller is concerned with how to fetch them and how to make them randomly. Remove debug statement from bonfire/show.jade
This commit is contained in:
@ -167,7 +167,22 @@ module.exports = {
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
},
|
||||
|
||||
randomPhrase: function() {
|
||||
var phrases = resources.phrases;
|
||||
return phrases[Math.floor(Math.random() * phrases.length)];
|
||||
},
|
||||
|
||||
randomVerb: function() {
|
||||
var verbs = resources.verbs;
|
||||
return verbs[Math.floor(Math.random() * verbs.length)];
|
||||
},
|
||||
|
||||
randomCompliment: function() {
|
||||
var compliments = resources.compliments;
|
||||
return compliments[Math.floor(Math.random() * compliments.length)];
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user