Ruby on Rails
Saturday, August 17, 2013
hi
I tried
<%= content_tag(:h1,"Arrange".html_safe + content_tag(:span," Demo"))%>
<%= content_tag(:h1,"Arrange".html_safe + content_tag(:span," Demo"))%>
its coming fine.
thanks for everyone .
On Wed, Aug 14, 2013 at 2:57 AM, masta Blasta <lists@ruby-forum.com> wrote:
kanna wrote in post #1118570:
> Hi
>
> i tried content_tag inside content_tag bu its not working
>
> <%= content_tag(:h1,"Arrange"+content_tag(:span,"Demo"))%>
>
> i want like this type
>
> <h1>Arrange <span>Demo</span></h1>
>
>
>More readably (IMO):What's wrong with just using standard HTML:
>
> <%= content_tag :h1 do %>
> Arrange <%= content_tag :span, 'Demo' %>
> <% end %>
Not sure how a bunch of nested content_tag() are 'more readable' than
<h1>Arrange <span>Demo</span></h1>
that.
Personally i hate the content_tag method. It just obfuscates your DOM.
--
Posted via http://www.ruby-forum.com/.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/a4281ea275f17d674b48c94267db2660%40ruby-forum.com.
--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/CAPtiWRDNE8PR79e-5V%2BsbbYJX%2BQ8o9qfbSOTA8_s5u%2BvW414WA%40mail.gmail.com.
For more options, visit https://groups.google.com/groups/opt_out.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment