I have a form in which a bunch of new users can be created with the same
password if desired. I’m trying to write the password into the session
and pull it out in the controller (besides avoiding putting it into
params, this also should let me keep it for repopulating the text field
if the creation fails for any reason and the user gets sent back to the
page with the form).
As part of a form tag, i have this text field which is supposed to write
the value entered in it into the session
<% form_tag :action => ‘batch_save’, :id => @user do %>
…
Password:<%= text_field_tag :password, session['new_users_password'] %> .. <%= submit_tag 'Save' %>
<% end -%>But, in the batch_save method in the controller, when i evaluate
session[‘new_users_password’], i get nil back.
Can anyone see what i’m doing wrong?
thanks
max