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: <h1>All Locations</h1> 2: <% form_tag locations_path, :method => :get do %> 3: <p> 4: <%= text_field_tag :search, :params[:search] %> 5: <%= submit_tag "search near", :name => nil %> 6: </p> 7: <% end %> Rails.root: c:/rails/maps -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Tim Shaffer
2011-Sep-19 16:27 UTC
Re: can''t convert Symbol into Integer rails textfieldtag
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 -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To view this discussion on the web visit https://groups.google.com/d/msg/rubyonrails-talk/-/VT8ujwMUKaYJ. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
venkata reddy
2011-Sep-19 17:40 UTC
Re: can''t convert Symbol into Integer rails textfieldtag
Yes, missed the simple syntax. Thanku you Tim. On Sep 19, 9:27 pm, Tim Shaffer <timshaf...-BUHhN+a2lJ4@public.gmane.org> wrote:> 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-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.