cgriego/active_attr — Issue #79: respond_with() behavior when there are validation errors
Author: bitbutcher
Created: 2012-03-01 02:24:11+00:00
State: open

Serialization doesn't seem to align with ActiveRecord::Base or ActiveModel::* behavior when there are validation errors present on the model.

This is my usage pattern for the transient model within the controller. This works with my original ActiveModel::*-based transient model but not with the ActiveAttr::Model-based version.

```Ruby
model = MyModel.new(params)
if model.valid?
# do something with the valid model
else
#this should serialize the model's errors not the model's properties
respond_with(model, status: :bad_request)
end
```

Rails 3.2.1 / Ruby 1.9.3p0