logo       

Re: bug in routes ???: msg#00240

lang.ruby.rails.core

Subject: Re: bug in routes ???

Hello Greg,

2006/9/25, Greg Hauptmann <greg.hauptmann.ruby@xxxxxxxxx>:
> [5] Placing dynamically generated value for :locale in every link_to. Not
> ideal from a DRY concept. Example:
> link_to 'my link', { :locale => '#{params[:locale]}', :controller
> => '/parent/child', :action => 'testaction' }

Take a look at default_url_options:
http://api.rubyonrails.com/classes/ActionController/Base.html#M000208

That is the best way to implement #5.

Hope that helps !
--
François Beausoleil
http://blog.teksol.info/
http://piston.rubyforge.org/

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby
on Rails: Core" group.
To post to this group, send email to rubyonrails-core@xxxxxxxxxxxxxxxx
To unsubscribe from this group, send email to
rubyonrails-core-unsubscribe@xxxxxxxxxxxxxxxx
For more options, visit this group at
http://groups.google.com/group/rubyonrails-core
-~----------~----~----~----~------~----~------~--~---

<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise