title: How do I turn Model.order('attributes desc') into a scope?
body: <p>I have </p>
  
  <pre><code>  @microposts = Micropost.order('votes desc').paginate(:page =&gt; params[:page])
  </code></pre>
  
  <p>and it works but I want to convert it to a scope such that I can call</p>
  
  <pre><code>  # @microposts = Micropost.all.paginate(:page =&gt; params[:page])
  </code></pre>
  
  <p>and have the same output. </p>
  
  <p>In micropost.rb, I have</p>
  
  <pre><code>  scope :order =&gt; 'votes desc'
  </code></pre>
  
  <p>but that doesn't work. The error I receive is:</p>
  
  <pre><code>undefined method `to_sym' for {:order=&gt;"votes desc"}:Hash
  </code></pre>
  
  <p>Can someone explain to me what is going on?</p>
  
  <p>Thanks.</p>