|
|
|
|
|
by dorianm
3559 days ago
|
|
The logic made me laugh :) def random_reply
reply = Reply.order("RAND()").first.content
# if the conversation is getting long, start injecting hipster sentences to the end...
if self.conversation.emails.count > 10
reply << " #{Faker::Hipster.sentence}"
end
return reply
end
P.S.: It's a simple Rails app |
|