problem with accepts_nested_attributes_for and reject_if

Hi, m using rails 3.0.3 and i m getting problem with reject_if .I just want to check the condition that if all fields of educations table are blank then reject otherwise their values should be stored in database. but actually this saves blank also in database.

class Profile < ActiveRecord::Base

has_many :educations, :dependent => :destroy accepts_nested_attributes_for :educations, :reject_if => proc { |a| a.blank? }, :allow_destroy => true

end

i have tried this also : accepts_nested_attributes_for :educations, :reject_if => lambda { |a| a.blank? }, :allow_destroy => true

and also : accepts_nested_attributes_for :educations, :reject_if => lambda { |a| a.all_blank? }, :allow_destroy => true

Can anyone give me an idea of what might be going wrong here?

Thanks kirti