adds better support for rails 4.