title: Rails Upgrade to 5.2.4.1 ActiveModel::MissingAttributeError
body: <p>I am trying an upgrade from:</p>
  
  <ul>
  <li>Ruby 2.2.2</li>
  <li>Rails 5.0.0</li>
  <li>Gemfile.lock
  
  <ul>
  <li>attr_encrypted (3.1.0)</li>
  <li>encryptor (~> 3.0.0)</li>
  </ul></li>
  </ul>
  
  <p>to</p>
  
  <ul>
  <li>Ruby 2.6.5 </li>
  <li>Rails 5.2.4.1</li>
  <li>Gemfile.lock
  
  <ul>
  <li>attr_encrypted (3.1.0)</li>
  <li>encryptor (~> 3.0.0)</li>
  </ul></li>
  </ul>
  
  <p>and it's now failing in controller methods for <code>attr_encrypted</code> fields.</p>
  
  <p>I have the following action:</p>
  
  <pre><code>def index
      respond_to do |format|
        format.html do
          # make sure that only users who have Organization reading abilities see this page
          authorize! :read, Organization
        end
  
        if current_user.organization_resource?
          params[:organization] = current_user.organization.id
        elsif current_user.isv_resource?
          params[:isv] = current_user.isv.id
        end
  
        format.json do
          render json: Organization.paginated_summary(
            params[:offset].to_i,
            params[:per_page].to_i,
            query:           params[:query],
            isv_id:          params[:isv],
            organization_id: params[:organization],
            tz_cookie:       cookies[:tzOffset].blank? ? 'UTC' : cookies[:tzOffset]
          )
        end
      end
    end
  </code></pre>
  
  <p>and it's failing with <code>ActiveModel::MissingAttributeError - missing attribute: encrypted_api_token</code> where <code>api_token</code> is the field that is attr_encrypted and it's not being requested in that query</p>
  
  <p>If I execute the block that is being rendered</p>
  
  <pre><code>Organization.paginated_summary(
            params[:offset].to_i,
            params[:per_page].to_i,
            query:           params[:query],
            isv_id:          params[:isv],
            organization_id: params[:organization],
            tz_cookie:       cookies[:tzOffset].blank? ? 'UTC' : cookies[:tzOffset]
          )
  </code></pre>
  
  <p>it's working and returning the expected data. Still it's failing when <code>render json:</code> the information and I am not able to track it down.</p>
  
  <p>If I remove the attr_encrypted property from the field, then no error is being returned.</p>
  
  <p>Has anyone encountered this type of issues?</p>
  
  <p>Thanks in advance!</p>