Created
June 24, 2010 23:19
-
-
Save 5v3n/452136 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<%# | |
# search given tags... | |
%> | |
<% | |
require File.join(File.dirname(__FILE__), 'src', 'toto_decoration') | |
decorator = TotoDecoration.new | |
%> | |
<!-- list of all articles & their tags: | |
<% @articles.each do |a| | |
tags = decorator.process_to_array(a[:tags]) | |
%>tags from @articles[<%= a[:title]%>]: <%= tags.inspect %><br/> | |
<% end %> | |
--> | |
<% @articles.select do |a| | |
tags = decorator.process_to_array(a[:tags]) | |
tags.include?("hacks") | |
end[0...10].each do |article| %> | |
<a href="<%= article.path %>"><%= article.title %></a><br/> | |
<% end %> | |
<br/> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment