On Thu, Apr 06, 2006 at 05:12:17AM +0200, Gunt wrote:
end
When it enters the else section, it renders the ‘show’ action, but it
adds the data to the database. How do I prevent this from happening?
Well, if your @item isn’t valid, it shouldn’t be successfully saved.
There’s something funny going on otherwise.
Your example doesn’t show where your save method is getting saved, or if
there’s some data manpulation – or even what your validation consists
of.
Knowing that stuff would help quite a bit.
Matt
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.