Permalink
Browse files

Make compatible with ruby 1.9 (when : > when then)

  • Loading branch information...
1 parent 7297633 commit e0e9bd9fc55e66c3c2eab7c999152c4785a1af51 @jomz committed Jan 20, 2012
Showing with 2 additions and 2 deletions.
  1. +2 −2 lib/sphinx_search/radius_tags.rb
View
4 lib/sphinx_search/radius_tags.rb
@@ -132,8 +132,8 @@ module RadiusTags
}
tag 'search:results:each:excerpt' do |tag|
content = case tag.attr['for']
- when 'title' : tag.locals.page.title
- when nil : tag.locals.page.parts.map(&:content).join(' ')
+ when 'title' then tag.locals.page.title
+ when nil then tag.locals.page.parts.map(&:content).join(' ')
else tag.locals.page.part(tag.attr['for']).try(:content) || ''
end
tag.globals.results.excerpt_for(content, tag.locals.page.class)

0 comments on commit e0e9bd9

Please sign in to comment.