badbrush-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org
2007-Sep-06 19:08 UTC
Using symbols for controllers and actions
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 --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
badbrush-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org
2007-Sep-06 19:08 UTC
Using symbols for controllers and actions
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 --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---