title: How to extract all attributes with Rails Jbuilder?
body: <p>It's a pain to write codes like this all the time in jbuilder.json template:</p>
  
  <pre><code>json.extract! notification, :id, :user_id, :notice_type, :message, :resource_type, :resource_id, :unread, :created_at, :updated_at
  </code></pre>
  
  <p>So I'd like to code like this;</p>
  
  <pre><code>json.extract_all! notification
  </code></pre>
  
  <p>I've found I can do it like the following codes, but they are still a bit lengthy to me.</p>
  
  <pre><code>notification.attributes.each do |key, value|
    json.set!(key, value)
  end
  </code></pre>
  
  <p>Is there any better way?</p>