title: How to update an active record in ruby
body: <p>I want to update status to 1, when user views a message.</p>
  
  <p>i need an active record, to change status to 1 ,where status is 0 and id is current id</p>
  
  <p>Any help is appreciated. 
  i want to change this query to active record.</p>
  
  <p><code>UPDATE 'course_queries SET status = '1' WHERE course_queries.id =41 and status=0;</code></p>