From fb837521c9c88de2a4673530a1c770a3f2699e45 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julian=20B=C3=A4ume?= Date: Sat, 28 Aug 2010 01:51:45 +0800 Subject: [PATCH] fix retro_blog for newer version of external lib Since 2010-04-30 acts-as-taggable-on uses namespaces for their models. This patch is needed to run the retro_blog extension with recent versions of acts-as-taggable-on. This fixes http://retrospectiva.org/tickets/840 --- config/environment.rb | 2 +- extensions/retro_blog/ext/project.rb | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/config/environment.rb b/config/environment.rb index eabfef70..c9ff98d2 100644 --- a/config/environment.rb +++ b/config/environment.rb @@ -22,7 +22,7 @@ # They can then be installed with "rake gems:install" on new installations. config.gem 'rack', :lib => 'rack', :version => '~> 1.0.0' config.gem 'will_paginate', :lib => 'will_paginate', :version => '>= 2.3.8' - config.gem 'acts-as-taggable-on', :lib => 'acts-as-taggable-on', :version => '>= 1.0.3' + config.gem 'acts-as-taggable-on', :lib => 'acts-as-taggable-on', :version => '>= 2.0.4' config.gem 'RedCloth', :lib => 'redcloth', :version => '>= 4.1.9' # Only load the plugins named here, in the order given. By default, all plugins diff --git a/extensions/retro_blog/ext/project.rb b/extensions/retro_blog/ext/project.rb index e72acc10..c35043e2 100644 --- a/extensions/retro_blog/ext/project.rb +++ b/extensions/retro_blog/ext/project.rb @@ -7,9 +7,9 @@ def categories records = find :all, - :select => "DISTINCT #{Tag.quoted_table_name}.name", + :select => "DISTINCT #{ActsAsTaggableOn::Tag.quoted_table_name}.name", :joins => :categories, - :order => "#{Tag.quoted_table_name}.name" + :order => "#{ActsAsTaggableOn::Tag.quoted_table_name}.name" records.map(&:name) end