Setting index on rails.