Make sure to properly mention the code is copied from rails with only slight modification.