rewriting an URL route in Ruby.. [RoR]

Discussion in 'Ruby' started by Josselin, Aug 25, 2007.

  1. Josselin

    Josselin Guest

    right now I am using an an helper action like that


    def document_pagination_links_remote(paginator)
    page_options = {:window_size => 1}
    pagination_links_each(paginator, page_options) do |n|
    options = {
    :url => franchise_documents_url:)params => params.merge({:page => n})),
    :method => :get,
    :update => 'table_document'
    }
    html_options = {:href => franchise_documents_path:)params =>
    params.merge({:page => n}), :method => :get)}
    link_to_remote(n.to_s, options, html_options)
    end
    end

    I need to rewrite the url, according to a string as a parameter
    'container' container = "franchise" or "whatever"

    def document_pagination_links_remote(paginator, container)
    ..... depending upon container string
    :url => franchise_documents_url:)params => params.merge({:page => n})),
    :url => whatever_documents_url:)params => params.merge({:page => n})),

    how should I write it ?

    thanks for your help

    joss
     
    Josselin, Aug 25, 2007
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Juha Borenius

    URL rewriting

    Juha Borenius, Aug 14, 2003, in forum: ASP .Net
    Replies:
    2
    Views:
    479
    Colin Young
    Aug 15, 2003
  2. Thedotnetteer
    Replies:
    2
    Views:
    819
    Thedotnetteer
    Nov 27, 2003
  3. Gaurav  Agarwal
    Replies:
    2
    Views:
    759
    Gaurav Agarwal
    Jan 31, 2005
  4. =?Utf-8?B?cmFwaWRkYXRh?=

    url rewriting with no extension in url

    =?Utf-8?B?cmFwaWRkYXRh?=, Nov 1, 2006, in forum: ASP .Net
    Replies:
    8
    Views:
    422
    Flinky Wisty Pomm
    Nov 2, 2006
  5. Recruitment Development

    [JOB] Ruby/Ruby on Rails(RoR) Developers in London

    Recruitment Development, Aug 6, 2007, in forum: Ruby
    Replies:
    0
    Views:
    127
    Recruitment Development
    Aug 6, 2007
Loading...

Share This Page