title: Automatic converting old syntax of scopes to new one
body: <p>I'm working on upgrade of old code which contains a lot of deprecated code in scopes. For example: </p>
  
  <pre><code>scope :by_domain, lambda { |domain| {:joins =&gt; :profile_domains,
                                       :conditions =&gt; ["profile_domains.domain_id = ?", domain] }
  </code></pre>
  
  <p>It should be changed to:</p>
  
  <pre><code>scope :by_domain, -&gt;(domain) { joins(:profile_domains).
                                 where("profile_domains.domain_id = ?", domain) }
  </code></pre>
  
  <p>Is there some solution that automatically converts the old syntax to a new  one or developers every time correct it manually?</p>