How can I add specific content inside a tag when I create it using the tag helper? Is there an "inner_html" option? This doesn''t seem to be working. <%= tag(:map, :id => (@module.css_id), :inner_html =>''innerhtml'' ) %> -- 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.
I want it to output this, for example and all the <area shape> stuff will be passed to the tag helper as inner html: <map name="Map" id="Map"> <area shape="rect" coords="230,678,309,719" href="http:// www.aolartists.com/" alt="AOL"> <area shape="rect" coords="321,720,356,754" href="http:// www.saksfifthavenue.com" alt="Saks Fifth Avenue "> </map> On Feb 22, 6:31 pm, Mlle <emsto...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> How can I add specific content inside a tag when I create it using the > tag helper? Is there an "inner_html" option? > This doesn''t seem to be working. > > <%= tag(:map, :id => (@module.css_id), :inner_html =>''innerhtml'' ) %>-- 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@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
On Tue, Feb 22, 2011 at 3:31 PM, Mlle <emstolfo-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> How can I add specific content inside a tag when I create it using the > tag helper? Is there an "inner_html" option?Per the doc `tag` generates an *empty* tag -- which by definition can''t have content "inside" it. However, `content_tag` can :-) HTH, -- 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@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.