Fully Functional Flames script in Rails