Closed
Description
create fails silently if an embedded has_one object has a validation error.
class Question < ActiveRecord::Base
has_one :answer
accepts_nested_attributes_for :answer
end
class Answer < ActiveRecord::Base
belongs_to :question
validates :text, :inclusion => %w{42 no}
end
POST to /activeadmin/questions:
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
Metadata
Metadata
Assignees
Labels
No labels