title: How to perform model validation in rails?
body: <p>I have a rails application where <strong>Activity</strong> is one of the resources with the following attributes:</p>
  
  <ul>
  <li>status (recording the status of activity "in progress", "complete")</li>
  <li>start  (date when activity started)</li>
  <li>end    (date when activity ended)</li>
  </ul>
  
  <p>I want to create a new record for activity with status "in progress", given there is no existing activity with the same status. I believe this can be done using model validation, but being new to rails I have no idea how.</p>