model Validation for Polymorphic association

Hi All,

   Anybody did the model validation for polymorphic association table??

class Request < ActiveRecord::Base
  belongs_to :user
  belongs_to :user_request,:polymorphic=>true
  belongs_to :service

class WaterBill < ActiveRecord::Base
  has_one :request,:as=>:user_request,:dependent=>:destroy

  validates_presence_of(:name_of_legalperson, :message => "Should not be


   Here validation in WaterBill model is not working..

my controller code...

def save[:water_bill])
      flash[:notice] = 'Water Bill Was Successfully Created.'
      redirect_to :action => 'newwaterbill'
      render :action => 'newwaterbill'

  Any thing wrong in this code .. please clarify my doubts...

If you use the debugger you can easily see what the model's error hash contains.

script/server --debugger

Then add 'debug' near where the code is causing a problem.

Try changing your code so you can actually get at the errors:
if @request.new_record?

Also, I would choose a model name other than Request, seems too easily
confused and friends.