Rails pg

Final changes