Kevin McCarthy wrote:> Hey, is there a way I can get link_to to spit out absolute URLs,
> rather than relative URLs? I would like to do this for SEO purposes.
> Is there something that I have to subclass to get this to go, or is
> there a better hack out there to do this.
>
> Thanks!
>
> Kevin
If you are using named routes you can just used named_route_url instead
of named_route_path.
Or: link_to :action => ''index'', :only_path => false
Or I think you can add this method to application.rb
def default_url_options
{ :only_path => false }
end
--
Posted via http://www.ruby-forum.com/.
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---