I have a form containing a text field along the lines of:
<%= form_for(wizard, :url => wizard_path, :method => :put) do |f| %> .... <%= form.text_field "gas_credentials[user_id]", :value => wizard.gas_credentials['user_id'] %> .... <% end %>
Mysteriously, when wizard.gas_credentials is nil, the text_field gets initial text equal to the current_user.email (which in this case is admin@admin.com). At the very least, I'd expect an error trying to call on nil.
What's especially odd is that the wizard model knows nothing about current_user, so I don't see where it's getting that value from. Can anyone shed light on what might be happening, or at least how text_field decides to compute its :value?
TIA
- ff
P.S.:
% rake about About your application's environment Ruby version 1.9.2 (x86_64-darwin10.6.0) RubyGems version 1.3.7 Rack version 1.2 Rails version 3.0.5 Environment development
... and I'm using devise 1.4.2 and warden 1.0.4