Skip to content
This repository has been archived by the owner on Jan 2, 2018. It is now read-only.

Commit

Permalink
Browse files Browse the repository at this point in the history
…able_on_steroids@329 20afb1e0-9c0e-0410-9884-91ed27886737
  • Loading branch information
jonathan committed Oct 2, 2007
1 parent b0d527d commit 24ab9b0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion README
Expand Up @@ -93,7 +93,7 @@ Controller:

View:
<% tag_cloud @tags, %w(css1 css2 css3 css4) do |tag, css_class| %>
<%= link_to tag.name, { :action => :tag, :id => name }, :class => css_class %>
<%= link_to tag.name, { :action => :tag, :id => tag.name }, :class => css_class %>
<% end %>

CSS:
Expand Down
4 changes: 3 additions & 1 deletion lib/acts_as_taggable.rb
Expand Up @@ -64,7 +64,9 @@ def find_options_for_find_tagged_with(tags, options = {})
conditions << tags.map { |t| sanitize_sql(["#{tags_alias}.name LIKE ?", t]) }.join(" OR ")

if options.delete(:match_all)
group = "#{taggings_alias}.taggable_id HAVING COUNT(#{taggings_alias}.taggable_id) = #{tags.size}"
group = "#{taggings_alias}.taggable_id"
column_names.each { |c| group << ", #{table_name}.#{connection.quote_column_name(column_name)}" }
group += " HAVING COUNT(#{taggings_alias}.taggable_id) = #{tags.size}"
end
end

Expand Down

0 comments on commit 24ab9b0

Please sign in to comment.