Hi list,

I've started migrating to rails 3 and right now I'm getting to grips with the
different methods for handling validation error message.

I've found this on asciiguides which seems good, the first code examples which 
move
the error display handling to a partial:

http://asciicasts.com/episodes/211-validations-in-rails-3

Which works perfectly for the new and create actions, however on the edit and 
update
actions it gives me the following, referring to the first line of the partial:

undefined local variable or method `target' for 
#<#<Class:0xb6459528>:0xb645683c>

The only difference between the new/create and the edit/update actions is the 
formers
uses @model.save and the latter @model.update_attributes.

If I take out the refence to the partial, replacing the model name back in, 
everything
works fine but really isn't DRY.

I can post full code examples if necessary.

Thanks

Matt

Attachment: pgp0ePpCxDehs.pgp
Description: PGP signature

Reply via email to