Save userform data in database

Hi,

I have a form like this.

<% form_for(@search) do |f| %>
  <%= f.error_messages %>

  <p>
    <%= f.label :country %><br />
    <%= f.text_field :country %>
  </p>

  <p>
    <%= f.label :city %><br />
    <%= f.text_field :city %>
  </p>
  <p>
    <%= f.submit 'Search' %>
  </p>
<% end %>

When a user is login i want to store the searches of the form. So the
user view recent searches.

Someone ideas/tips?

Grtz..remco

"saving data in a database" is pretty basic Rails. :slight_smile:

Perhaps you could pose a more specific question?

OK, sounds pretty straightforward.

User, Search, user has_many searches -- what's the issue?