Rewrite of ludomanger for Rails 4