Thanks, it's good. I had the same problem with links instead of li, and
I've encountered link_to_if in the reference:
=link_to_if make_link, url_for(...) do
this is dry :D
You could see the source of link_to_if (and link_to_unless) to see how
to implement it for %li's if you want to.
Also, I've just found capture:
- not_dry = capture do
%span This is not dry
- if defined?(skipLI) && skipLI
=not_dry
- else
%li
=not_dry
--
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 [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en.