Ruby on Rails 4.我可以通过flash范围传递对象

我有一个控制器,需要将validation失败的对象传递给另一个控制器操作来处理它们并向用户显示:

class PersonController def save_persons invalid_persons = ... #array of Person.new objects flash[:invalid_persons] = invalid_persons redirect_to action: :fix_errors end def fix_errors invalid_persons = flash[:invalid_persons] invalid_persons.each do |invalid_person| puts invalid_person.errors #here i get exception! end end end 

当我尝试puts invalid_person.errors我得到错误: undefined method errors for #Hash:0x007fd594e79098> 。 似乎rails将我的对象数组转换为一些哈希值

你能建议我,通过flash传递一些物体的正确方法是什么?