Hi,
The render had the same problem.
With great hope, I updated my machine to run Rails 1.1, but the
situation is if anything, worse. Now, wherever in the method I put
the redirect, I get the same result, so the relationship to the save
must have been spurious. With every try, the data is properly stored
and I get the correct Redirected to http:// etc. message at the right
point. But the browser still shows the page saying “Application
error - Rails application failed to start properly.” rather than the
page we should be redirected to.
As suggested, here is the code, in case it might shed some light on
this.
def make_user_request
if request.get?
@user = User.new
else
return unless set_user_contact_info
return unless save_user_contact
logger.error(“saved user and contact info \n”)
return unless attempt_request
logger.error("attempted_request \n")
mail_response(@user_request)
logger.error("returned from mail response should redirect now
\n")
redirect_to :action => ‘show_success’
end
end
def save_user_contact
if( @user.save )
logger.error("user was saved \n")
return true
end
logger.error("attempt to set invalid user #{params[:user]}\n")
flash[:notice] = "There was a problem with the data"
return false
end
I have also tried this, though it saves the user later than I really
want - same result. In both cases the data is properly saved and the
log shows the redirect, but the browser shows the page saying
“Application error - Rails application failed to start properly.” I
also tried the same if…else structure in the save_user_contact
method, so that the redirect is in that method instead of
make_user_request. But the behavior is identical.
def make_user_request
if request.get?
@user = User.new
else
return unless set_user_contact_info
return unless attempt_request
logger.error("attempted_request \n")
mail_response(@user_request)
logger.error("returned from mail response should redirect now
\n")
if save_user_contact
logger.error("saved user and contact info \n")
redirect_to :action => 'show_success'
else
logger.error("couldn't save user and contact info \n")
redirect_to :action => 'show_error'
end
end
end
Many thanks for any ideas.
Denise