in my controller I am collecting data (into a hash) like this (note that I do not have a BillingAddress model in my app, @billing_address is standard ruby hash
@billing_address = params[:billing_address]
my view is laid out like this
<%= text_field_tag 'billing_address[phone]' %>
I want to show the previous value that user entered (in case of errors), like this:
<%= text_field_tag 'billing_address[phone]', @billing_address['phone'] %>
however, this gives me an exception saying I am trying to access nil, ideas?
I guess
params[:billing_address]isnil.Try to assign empty hash if it is.