This code is not opening the link in a new window. Any ideas? <%= auto_link(@post, :href_options => { :target => ''_blank'' }) %>
Chris Habgood wrote:> This code is not opening the link in a new window. Any ideas? > > <%= auto_link(@post, :href_options => { :target => ''_blank'' }) %>What does the generated HTML look like? Best, -- Marnen Laibow-Koser http://www.marnen.org marnen-sbuyVjPbboAdnm+yROfE0A@public.gmane.org -- Posted via http://www.ruby-forum.com/.
normal without the target= "_blank" On Mon, Oct 5, 2009 at 1:43 PM, Marnen Laibow-Koser < rails-mailing-list-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote:> > Chris Habgood wrote: > > This code is not opening the link in a new window. Any ideas? > > > > <%= auto_link(@post, :href_options => { :target => ''_blank'' }) %> > > What does the generated HTML look like? > > Best, > -- > Marnen Laibow-Koser > http://www.marnen.org > marnen-sbuyVjPbboAdnm+yROfE0A@public.gmane.org > -- > 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 -~----------~----~----~----~------~----~------~--~---
2009/10/5 Me <chabgood-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>:> > This code is not opening the link in a new window. Any ideas? > > <%= auto_link(@post, :href_options => { :target => ''_blank'' }) %>I have seen suggestions that there is an error in the docs for auto_link and that it should be :html => {} rather than :href_options => {}. I cannot vouch for the correctness or otherwise of this however. Colin
Ya that worked. Thanks, I should have tried that. DOH! On Mon, Oct 5, 2009 at 1:52 PM, Colin Law <clanlaw-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org> wrote:> > 2009/10/5 Me <chabgood-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>: > > > > This code is not opening the link in a new window. Any ideas? > > > > <%= auto_link(@post, :href_options => { :target => ''_blank'' }) %> > > I have seen suggestions that there is an error in the docs for > auto_link and that it should be :html => {} rather than :href_options > => {}. I cannot vouch for the correctness or otherwise of this > however. > > Colin > > > >--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---