0

my rails application generates the following URL :

www.mysite.com/chicago?area_id=4

I'd like to "cut" it to :

www.mysite.com/chicago

Is it possible to do so using friendly_id ?

Thanks

skess mousse
  • 105
  • 1
  • 10
  • Why do you have to pass area_id too? area name is enough to find area record, `Area.find("chicago")` – Nitish Parkar Nov 17 '14 at 15:38
  • Because the param exported by the slug ('Parameters: {"area"=>"paris"}') implies a lots of side effects on the underlying controller (in particular an index action handled by thinking sphinx, which displays all alds per area). That's why I'm trying to pass area and area_id, and then "cut" the url using friendly_id, do you think it is possible ? – skess mousse Nov 17 '14 at 16:17
  • If you are passing two params, both of them will appear in the URL(unless it's a POST request). – Nitish Parkar Nov 17 '14 at 17:42

0 Answers0