add compatibility with rails 4.x - fixes deprecation warnings

Add support for rails 4 style lambda in place of now deprecated :conditions