title: Rails custom field in to_json
body: <p>I have this code:</p>
  
  <pre><code>@locations = @list.all.to_json(:root =&gt; false,
                   :only =&gt; [:author,:lat,:long,:text])
  </code></pre>
  
  <p>It works great and is exactly what I want. But now I want to add to the fields an url for the show page of each entry.</p>
  
  <p>So it would be like: </p>
  
  <pre><code>[{
     "author:"blabla",
     "lat":blabla,
     "long":blabla,
     "text":"blabla",
     "url":"url for show page"
   }]
  </code></pre>
  
  <p>I've tried merge option but it doesn't add anything or throw any errors.</p>
  
  <p>How can I achieve this?</p>