fix rails for relative URLs