# Error when output has a period (".") in the name

**URL:** <https://www.ruby-forum.com/t/error-when-output-has-a-period-in-the-name/173946>\
**Category:** Rails\
**Created:** [August 18, 2009, 4:35pm UTC](https://www.ruby-forum.com/t/error-when-output-has-a-period-in-the-name/173946 "2009-08-18T16:35:10Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![bagadoughnuts](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/71c47a/32.png) [@bagadoughnuts](https://www.ruby-forum.com/u/bagadoughnuts)\
**Post date:** [August 18, 2009, 4:35pm UTC](https://www.ruby-forum.com/t/error-when-output-has-a-period-in-the-name/173946/1 "2009-08-18T16:35:10Z")

</div>

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:

\<%#= link\_to h(user.username), user\_path(user) %\> \<%#= link\_to 'Edit', edit\_user\_path(user) %\> \<%#= link\_to 'Remove', user, :confirm =\> 'Are you sure?', :method =\> :delete %\>

Any help is appreciated!

-Tony

---

<div class="post-metadata">

**Author:** ![bagadoughnuts](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/71c47a/32.png) [@bagadoughnuts](https://www.ruby-forum.com/u/bagadoughnuts)\
**Post date:** [August 19, 2009, 1:18pm UTC](https://www.ruby-forum.com/t/error-when-output-has-a-period-in-the-name/173946/2 "2009-08-19T13:18:31Z")

</div>

Why are you calling user\_path(user) instead of just the id?

On Aug 18, 7:35 pm, Tony T. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)
