Forum: Ruby on Rails Problem during validation

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
Werner L. (Guest)
on 2008-12-05 17:56
(Received via mailing list)
Hi..I need some advice:

A formular which includes 3 partials
The partial will be chosen by userinput stored in a session

def new
   @booking =
   @booking_partial = partial_choice(session[:pre][:fahrt]) # 1,2 or 3

this works fine, but if the validation fails the partial will not be
shown again..!

Looks like the 'partial_choice' is not getting information then. I
dont see the point where to feed that info in again.

Thanks for your help
Ar C. (Guest)
on 2008-12-05 20:07
When your save fails, are you re-seeding the @booking_partial value?

def create
    # the happy path
    @booking_partial = blah blah blah
    render :action => 'new'
Werner L. (Guest)
on 2008-12-05 23:34
(Received via mailing list)
This topic is locked and can not be replied to.