From: Wyatt Greene <techifer...@gmail.com>
Date: Wed, 27 Jun 2012 09:41:56 -0400
Local: Wed, Jun 27 2012 9:41 am
Subject: Re: [boston.rb] enough theory, let's fix some bugs!
If I want SEO-friendly URLs, I use https://github.com/norman/friendly_id
On Jun 27, 2012, at 9:13 AM, Denis Haskin wrote:
> def to_param
> removing that makes it work. I had started to suspect that, as I was just starting to work around by hard-coding "/users/#{current_user.to_param}/orders" (oh the horror, but I didn't want to stay stuck on this forever).
> I'm not sure I understand why that broke things. Can someone explain? (I know, I should work it out myself but I can't get to that until this evening and I'm impatient ;-) ).
> Also, what is the current school of thought? People used to want to use to_param to make "SEO-friendly" URLs; I remember it causing me a lot of grief several years ago.
> Thanks!
> --
> On Wed, Jun 27, 2012 at 8:25 AM, Daniel Choi <dhc...@gmail.com> wrote:
> > and so I have the expected named route user_orders_path(@user). It works
> > ActionController::RoutingError (No route matches
> In rails c, what does `User.find(472).to_param` return?
> You can also test if the routes are being drawn correctly in `rails c`
> In rails c:
> u = User.find(472) # <= user with no orders
> # repeat above with a user that doesn't trigger this bug
> --
> -- You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
| ||||||||||||||