ROR and Javascript code added