wrap scope in lambda for rails 4