On 13 August 2012 07:12, Sumit Srivastava <sumit.theinvinci...@gmail.com> wrote: > Hi, > > I made a contact manager app using rails. I added TokenInput plugin to > introduce an instant contact search functionality in it. Tried following a > railscast http://railscasts.com/episodes/258-token-fields but have been > struggling with it for a while. Following is the code I use in my view > >> <%= form_tag({:action => 'show', :id => @contact_tokens}, :remote => true, >> :method=> :get) do %> >> <div id="search"> >> <%= label_tag "contact_tokens" %> >> <%= text_field_tag "contact_tokens", @contact_tokens %> >> </div> >> >> <div class="action"> >> <%= submit_tag "Show Details" %> >> </div> >> <% end %> > > > Where, Show is the action where this particular contact will be displayed. > But when I am trying to render this view, it show following error, > > No matching routes found for {controller "Contacts", action "Show" id=>nil"} > > I am not able to understand why is it showing id as nil. Or say why isn't > anything being passed from the text field used for the search.
Have a look in log/development.log to see what parameters are being passed when you click the link. Then have a look at the Rails Guide on Debugging which will show you techniques that you can use to debug the code. Colin -- 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@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.