I have a model that has one param that is a serialized Hash. I want to be able to edit the hash in a form using built in rails features. It is *almost* working. If you fill in the form and submit it, the params are correctly serialized and in the controller the model is built with the expected values. Where it falls apart is when I want the form to display an existing model: none of the values are displayed in the form fields.

My model looks like:

```
class Search < ActiveRecord::Base
  serialize :params
end

```

And the form:

```
<%= form_for @search do |f| %>
  <%= f.fields_for :params, @search.params do |p| %>
    <%= p.label :square_footage, "Square Footage:" %>
    <%= p.text_field :min_square_footage, :size => 10, :placeholder => "Min" %>
    <%= p.text_field :max_square_footage, :size => 10, :placeholder => "Max" %>
  <% end %>
  ...
<% end %>

```

And in the controller's create method:

```
@search = Search.new(params[:search])
@search.params ||= Hash.new
logger.info("search = #{@search.inspect}")

```

In the logs:

```
search = #<Search id: nil, params: {"min_square_footage"=>"1200", "max_square_footage"=>"1500"}, created_at: nil, updated_at: nil>

```

So you can see the values get POSTed.

In my view, above the form, I added this line to see if I could at least access the values:

```
<%= @search[:params][:min_square_footage] %>

```

And I can.

So if I can access the values in my view, and the form successfully POSTs the data to my controller, why can't my form display the data?