title: ActiveRecord: How to get all attributes of a model that can be mass-assigned?
body: <p>I would like to have a list of all attribute names that can be mass assigned. I need this for a custom form builder that will not add input fields by default that cannot be mass assigned. </p>
  
  <p>For example if I have the following model:</p>
  
  <pre><code>class Post &lt; ActiveRecord::Base
    attr_protected :account
  
    belongs_to :author
  
    validates_presence_of :title, :author
  end
  </code></pre>
  
  <p>I would like to have as a result <code>[:author, :title]</code>.</p>