# Using symbols for controllers and actions

**URL:** <https://www.ruby-forum.com/t/using-symbols-for-controllers-and-actions/196458>\
**Category:** Rails\
**Created:** [September 6, 2007, 9:09pm UTC](https://www.ruby-forum.com/t/using-symbols-for-controllers-and-actions/196458 "2007-09-06T21:09:03Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![casper\_the\_ghost](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/58956e/32.png) [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Post date:** [September 6, 2007, 9:09pm UTC](https://www.ruby-forum.com/t/using-symbols-for-controllers-and-actions/196458/1 "2007-09-06T21:09:03Z")

</div>

Hello

I am a newbe to rails. One of the things that confuses me is the usage  
of symbols and strings to refer to actions and controllers. Which of  
the following would be the right way to go:

\<%= link\_to ‘Login’, :controller =\> ‘user’, :action=\> ‘login’ %\>  
\<%= link\_to ‘Login’, :controller =\> ‘user’, :action=\> :login %\>  
\<%= link\_to ‘Login’, :controller =\> :user, :action=\> :login %\>

Or is it just personal taste? The last one probably spoils things  
like:

\<%= link\_to ‘Login’, :controller =\> ‘advanced/user’, :action=\> :login  
%\>

Any enlightments appreciated.

best regards  
badbrush
