gregbell/active_admin — Issue #1086: #create failing silently when a embedded_attribute validation fails
Author: wemcdonald
Created: 2012-02-29 01:16:59+00:00
State: open

#create fails silently if an embedded has_one object has a validation error.

```ruby
class Question < ActiveRecord::Base
has_one :answer
end
```

```ruby
class Answer < ActiveRecord::Base
belongs_to :question
validates :text, :inclusion => %w{42 no}
end
```

POST to /activeadmin/questions:

```ruby
Processing by Activeadmin::QuestionsController#create as HTML
Parameters: {"question"=>{"answer_attributes"=>{"text"=>"yes"}}, "commit"=>"Create Question"}
```

## What I see
AA redirects to ActiveAdmin::QuestionsController#new and logs no errors

## What I expect to see
A validation error