I have a link_to_remote that when clicked will put a form in a div and
there are three such links. The problem taht I having is that when this
form is placed with the div and the submit botton is hit, the method
gets called but as soon as the program reached the @user.save line
nothing happens. In other words, there is no reason why the user
submitte dinto should not be saved; I have done this hundreds of times
in this project, but for whatever reason, it will not save. Here is the
if statement that should be executed (in submit_delivery):
if @user.save
redirect_to :action => 'edit_traveler_form', :id => @user.id
end
and here is the code that renders the form in the div (in set_delivery):
What’s the line above this? How do you know @user is the same as the @user in the form? (Recall that Rails effectively stopped and
restarted between sending a view and collecting its responding
actions.)
if your @user is not the same as the one indicated by params[:id],
then it has no password…