Fixes for different Rails versions.