Is there any way to get the exception

Here is tow model:

class Morder < ActiveRecord::Base
has_many :morderlists
end

class Morderlist < ActiveRecord::Base
belongs_to :morder

def validate
#some validate
end
end

And the method in controller :

class MorderController < ApplicationController
def create
morder=Morder.new(:code=>‘001’)
morderlist1=Morderlist.new
morderlist2=Morderlist.new
morder.morderlists << [morderlist1,morderlist2]
morder.save!
end
end

If the morderlist1 or morderlist2 is not correct,I just get the errors
like 'morderlist invalid".Is there any way to get the detail
information?

On Sat, Aug 2, 2008 at 10:16 AM, Michael G.
[email protected] wrote:

If the morderlist1 or morderlist2 is not correct,I just get the errors
like 'morderlist invalid".Is there any way to get the detail
information?

morderlist.errors


Greg D.
http://destiney.com/