@@ -1,7 +1,7 @@
 class Trail < ActiveRecord::Base
   extend FriendlyId
 
-  validates :name, presence: true
+  validates :name, :description, presence: true
 
   has_many :steps, dependent: :destroy
   has_many :exercises, through: :steps
class Trail < ActiveRecord::Base
  extend FriendlyId

  validates :name, presence: true

  has_many :steps, dependent: :destroy
  has_many :exercises, through: :steps

  friendly_id :name, use: [:slugged, :finders]

  def steps_remaining_for(user)
    ExerciseWithProgressQuery.
      new(user: user, exercises: exercises).
      count { |exercise| exercise.state != Status::REVIEWED }
  end

  def self.most_recent_published
    order(created_at: :desc).where(published: true)
  end
end

If we add this validation, we also probably want a migration which sets a value for existing trails. Otherwise, all existing trails will become invalid.