I'm very happy so far with the Rails framework (at least compared to
J2EE). But I have some trouble
whith the valid?() method of ActiveRecord modell objects:
In the following code-snippet (behind a post-action the valid-method
sometimes is only the first-time
triggert. Pressing the back-button in the browser an submitting again
ignores the valid-action.
@user = User.new(params[:user])
@country = Country.new(params[:country])
@address = Address.new(params[:address])
# validation of the input field (before any save action)
...User.save(@user, @address) rescue puts "Save failed!"
Has anybody an idea?
Regards from Germany