Why are you calling user_path(user) instead of just the id?
On Aug 18, 7:35 pm, Tony Tony
<rails-mailing-l...-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org>
wrote:> Hi all,
>
> Hopefully this is easy for you guys. I''m trying to output a list
of
> usernames and everything has been working well. However, when I added a
> user with a period in their username it generates this error. If I
> rename the user to "Tom_Dixon" it works fine, but
"Tom.Dixon" fails.
>
> Any clue how to get this to work?
>
> Error:
>
> user_url failed to generate from {:controller=>"users",
:action=>"show",
> :id=>#<User id: 96, username: "Tom.Dixon" ...
>
> The code is your standard rails link_to:
>
> <td><%#= link_to h(user.username), user_path(user)
%></td>
> <td><%#= link_to ''Edit'', edit_user_path(user)
%></td>
> <td><%#= link_to ''Remove'', user, :confirm =>
''Are you sure?'', :method =>
> :delete %></td>
>
> Any help is appreciated!
>
> -Tony
> --
> Posted viahttp://www.ruby-forum.com/.