aboutsummaryrefslogtreecommitdiffstats
path: root/app/controllers/admin/blog
diff options
context:
space:
mode:
authorPhilip Arndt <parndt@gmail.com>2011-06-21 12:21:13 +1200
committerPhilip Arndt <parndt@gmail.com>2011-06-21 12:21:13 +1200
commitab57edba4078ed8e1ebc981080af0e9b83553ae6 (patch)
tree688987ce83e68feecb6f1ab32af462339cd7b039 /app/controllers/admin/blog
parent9edadabd56d97239e79076da35db37ef2ce12d8c (diff)
downloadrefinerycms-blog-ab57edba4078ed8e1ebc981080af0e9b83553ae6.tar.gz
refinerycms-blog-ab57edba4078ed8e1ebc981080af0e9b83553ae6.tar.bz2
refinerycms-blog-ab57edba4078ed8e1ebc981080af0e9b83553ae6.zip
Fix failure on Ruby 1.8.7 where lines can't begin with a . (it has to be on the previous line)
Diffstat (limited to 'app/controllers/admin/blog')
-rw-r--r--app/controllers/admin/blog/posts_controller.rb7
1 files changed, 3 insertions, 4 deletions
diff --git a/app/controllers/admin/blog/posts_controller.rb b/app/controllers/admin/blog/posts_controller.rb
index 7569aa6..9fdc638 100644
--- a/app/controllers/admin/blog/posts_controller.rb
+++ b/app/controllers/admin/blog/posts_controller.rb
@@ -12,10 +12,9 @@ class Admin::Blog::PostsController < Admin::BaseController
end
def tags
- @tags = BlogPost.tag_counts_on(:tags).where(["tags.name LIKE ?", "%#{params[:term].to_s.downcase}%"])
- .collect { |tag|
- {:id => tag.id, :value => tag.name}
- }
+ @tags = BlogPost.tag_counts_on(:tags).where(
+ ["tags.name LIKE ?", "%#{params[:term].to_s.downcase}%"]
+ ).map { |tag| {:id => tag.id, :value => tag.name}}
render :json => @tags.flatten
end