[Fix] Added compatibility with new Rails 4.2 APIs