uses ActsAsTaggableOn.named rather than SQL to check for an existing Tag
This commit is contained in:
@@ -85,7 +85,7 @@ class DebatesController < ApplicationController
|
||||
|
||||
def parse_tag_filter
|
||||
if params[:tag].present?
|
||||
@tag_filter = params[:tag] if ActsAsTaggableOn::Tag.where("LOWER(tags.name) = ?", params[:tag].downcase).exists?
|
||||
@tag_filter = params[:tag] if ActsAsTaggableOn::Tag.named(params[:tag]).exists?
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user