Support rails 4.

thanks