Nicolas Cavigneaux
2007-Sep-18 13:55 UTC
[PATCH] Automatically set :only_path option to false when :host option is specified in url helpers
Hello, I''ve just posted a patch to the Trac. It intends to simplify the use of url helpers such as link_to when you use the :host option. When you''re using a helper such as link_to and that you provide a :host option to it, it''s not use by default, you have to set :only_path to false too to enable it (to have the full URL, not the relative one). This tiny patch remedies this. Now when you specified the :host option, the :only_path option is automatically set to false. Before this patch you had to do : link_to(''Test Link'', {:controller => ''weblog'', :action => ''show'', :host => ''www.example.com'', :only_path => false})) and now you can do : link_to(''Test Link'', {:controller => ''weblog'', :action => ''show'', :host => ''www.example.com''})) to get the same result. This patch is available at : http://dev.rubyonrails.org/ticket/9586 Have a good day. -- Nicolas Cavigneaux http://www.bounga.org http://www.cavigneaux.net --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---