Frederick Cheung wrote: > Typically one deals with this by re-rendering the form, not by > redirecting. You'll very often see this pattern: > > @foo = Foo.new params[:foo] > if @foo.save > #success > redirect_to ... > else > render :action => 'new' > end
thanks for the help, fred. i'm still a little confused. it is my understanding that "actions" are methods in the controller. would that code you posted be in a new def? i.e. def new # code you posted end are you saying i need to have the show and the handle performed by the same method? that doesn't make sense to me as in the 'show' case, i'm not looking for anything but in the 'complete' case, i am. how do i know what i need to do if i have only one method doing both? is there some tutorial somewhere you could point me to that goes in depth on forms and best practices in using them? a tutorial that goes into one controller method v. two; model object forms v. forms with just fields on them, etc. thanks, -peter -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---

