Forum: Ruby on Rails URL formatting

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
Palani K. (Guest)
on 2009-04-03 15:04
      The problem i am facing is as follows:

       I want to generate the URL as follows

As of now MY URL is :

The above URL is framed from JQuery by selecting  the select box value.

The JQuery i used:

    def select_filter_by_city_js
      Event.observe($('filter_by_country'), 'change', function(e) {
        window.document.location = '#{search_developments_url}' +
?search[address]=' + e.element().getValue();

In my routing file(routes.rb) : i defined for search_developments_ur

map.search_developments '/developments/find/',:controller=>

In my controller : I get the value like

 def search

    location.heading = :search

    show_results = params.has_key?(:search)
@title = 'Find Developments ' + params[:search].to_s
    @search =[:search])
    @developments = show_results ?[:page]) :

    respond_to do |format|
      format.html { render :action => (show_results ? 'index' :
'search') }
      format.xml  { render :xml => @developments }

    I guess i need to work with routes.rb. I tried so many combinations
but no luck . can any one please advise me. what i miss here . Thanks.
This topic is locked and can not be replied to.