Hacker News new | ask | show | jobs
by sztwiorok 3559 days ago
Great idea!

I'm sure that GitHub community will help to make it even better

https://github.com/beweinreich/mlooper

1 comments

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