You should define your scope using a proc
.
class ClassList < ActiveRecord::Base
scope :upcoming_classes, proc { where('class_date > ?', Date.today) }
end
Rails 4+ expects scopes to be wrapped with a callable object, which is usually defined as a proc
. See the Active Record Query Interface: Scopes documentation; there they use the -> { }
proc syntax.