Hi, i've a page where when a params[:something] is passed all/some the urls in that page must have the params[:something] too, but when there isn't it shouldn't appear. I've tried with:
report_url(params[:id], :something => params[:something]) this works when there is the params[:something], but it doesn't when there isn't, as the result is: http://localhost:300/report/1?something= So i've tried with tmp = params[:something] ? {:something => params[:something]} : {} report_url(params[:id], tmp) This is better, because works when there is the parameter, and almost does when there isn't, as the result is: http://localhost:300/report/1? Is there any way to have the two results http://localhost:300/report/1?something=123 and http://localhost:300/report/1 when there is and there isn't the parameter? Without having the question mark at the end in the second case -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ 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 [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---

