Replace `conditions' with lambda { where(...) } to eliminate the warning on Rails 4