Skip to content

Commit

Permalink
Add opposite of if_empty, unless_empty
Browse files Browse the repository at this point in the history
  • Loading branch information
Kunal Shah authored and Josh French committed Jul 28, 2009
1 parent aac9db6 commit 912d3a2
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions lib/sphinx_search/radius_tags.rb
Expand Up @@ -87,5 +87,11 @@ module RadiusTags
tag.expand if tag.locals.results.empty?
end

desc %{
Renders if no results were returned.
}
tag 'results:unless_empty' do |tag|
tag.expand unless tag.locals.results.empty?
end
end
end

0 comments on commit 912d3a2

Please sign in to comment.