Skip to content

Instantly share code, notes, and snippets.

@BenHall
Created June 20, 2009 03:03
Show Gist options
  • Save BenHall/133022 to your computer and use it in GitHub Desktop.
Save BenHall/133022 to your computer and use it in GitHub Desktop.
routes.rb
map.term ':term', :controller => 'conference', :action => 'index'
index.rhtml
<% form_for :term, :url => { :controller => :conference, :action => :index }, :html => {:method => :get} do |f| %>
<input type="text" name="term" id="search" size="50" />
<input type="submit" value="Submit" id="submit" />
<% end %>
URL comes out as http://127.0.0.1:3000/conference?term=test123 where as I want http://127.0.0.1:3000/test123
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment