if i had something like this.. <ul class="list> <li>one</li> <li class=''two''>two</li> </ul> how would i go about storing that in a string variable? i have tried something like string = <<END <ul class="list> <li>one</li> <li class=''two''>two</li> </ul> END but am having no luck.. thanks! -- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
On Mon, May 2, 2011 at 1:38 PM, Sergio Ruiz <lists-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org> wrote:> i have tried something like > > string = <<END > > <ul class="list> > <li>one</li> > <li class=''two''>two</li> > </ul> > > END > > but am having no luck..>> string = <<END<ul class="list> <li>one</li> <li class=''two''>two</li> </ul> END => "\n<ul class="list>\n<li>one</li>\n<li class=''two''>two</li>\n</ul>\n\n">> puts string<ul class="list> <li>one</li> <li class=''two''>two</li> </ul> => nil>>What kind of "luck" were you expecting? -- Hassan Schroeder ------------------------ hassan.schroeder-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org twitter: @hassan -- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
On 2 May 2011 21:38, Sergio Ruiz <lists-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org> wrote:> how would i go about storing that in a string variable? > > i have tried something > but am having no luck..It would help if you said what you then tried to do or what specific problem/error message you summarise with "no luck", It''s also worth noting that you''re not closing the quote on the ul''s class name, so if you tried to use that string as HTML in a view, it would not render correctly. -- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.