We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hi,
This a great plugin. Here two small bugs.
in : find_options_for_find_tagged_with() change : conditions << sanitize_sql(["context = ?",on.to_s]) to : conditions << sanitize_sql(["#{Tagging.table_name}.context = ?",on.to_s])
in : find_options_for_tag_counts() change: { :select => "#{Tag.table_name}.id, #{Tag.table_name}.name, COUNT() AS count", :joins => joins.join(" "), :conditions => conditions, :group => group_by } to : { :select => "#{Tag.table_name}.id, #{Tag.table_name}.name, COUNT() AS count", :joins => joins.join(" "), :conditions => conditions, :group => group_by, :order => options[:order] }
Best regards,
miguel cabero
The text was updated successfully, but these errors were encountered:
forget the first bug correction, here is the right change : in : find_options_for_find_tagged_with() change :
unless (on = options.delete(:on)).nil? conditions << sanitize_sql(["#{context = ?",on.to_s]) end taggings_alias, tags_alias = "#{table_name}_taggings", "#{table_name}_tags"
to : taggings_alias, tags_alias = "#{table_name}_taggings", "#{table_name}_tags" unless (on = options.delete(:on)).nil? conditions << sanitize_sql(["#{taggings_alias}.context = ?",on.to_s]) end
Sorry, something went wrong.
Pretty sure this is fixed now, as I rewrote find_options_for_find_tagged_with.
No branches or pull requests
Hi,
This a great plugin. Here two small bugs.
in : find_options_for_find_tagged_with()
change : conditions << sanitize_sql(["context = ?",on.to_s])
to : conditions << sanitize_sql(["#{Tagging.table_name}.context = ?",on.to_s])
in : find_options_for_tag_counts()
change:
{ :select => "#{Tag.table_name}.id, #{Tag.table_name}.name, COUNT() AS count",
:joins => joins.join(" "),
:conditions => conditions,
:group => group_by
}
to :
{ :select => "#{Tag.table_name}.id, #{Tag.table_name}.name, COUNT() AS count",
:joins => joins.join(" "),
:conditions => conditions,
:group => group_by,
:order => options[:order]
}
Best regards,
miguel cabero
The text was updated successfully, but these errors were encountered: