Can't convert Symbol into Integer rails textfieldtag

I am trying to implement the geocoder. When i am trying to include a
search form, i am getting the following error.

TypeError in Locations#index

Showing c:/rails/maps/app/views/locations/index.html.erb where line #4
raised:

can’t convert Symbol into Integer
Extracted source (around line #4):

1:

All Locations


2: <% form_tag locations_path, :method => :get do %>
3:


4: <%= text_field_tag :search, :params[:search] %>
5: <%= submit_tag “search near”, :name => nil %>
6:


7: <% end %>
Rails.root: c:/rails/maps

Perhaps take a look at line 4.

You’re referencing :params[:search] but params is not a symbol. I think
perhaps you meant params[:search

Yes, missed the simple syntax.
Thanku you Tim.

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs