Category/tag entry search

Andre Nathan andre at sneakymustard.com
Sat Jun 24 13:37:02 EDT 2006


Hello

I'm using this code to search for the latest post of a given category in
my blog:

 <% entry = weblog.find(:match => /^mycategory\//, :lastn => 1).first %>

Is there a better way to do that search? Maybe using tags? Ideally I'd
like to filter based on a tag name instead of relying on doing a match
that depends on the filesystem layout.

Thanks,
Andre



More information about the Hobix-is-the-way mailing list