締め切り属性を使用して、モデル内のデータセット(less_than_a_year、less_than_six_monthなど)を検索できるスコープを作成しようとしています。
class Goal < ActiveRecord::Base
attr_accessible :category, :title, :detail, :deadline, :achieve
#need help solving this
scope :less_than_a_year, where()
end
したがって、goal.less_than_a_yearを実行し、1年未満のデータのリストを提供します。ありがとうございました。