Add rails 4 compatibility
Add support for lambda, proc and block