yury-acts-as-taggable-on 1.0.2 → 1.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -128,7 +128,7 @@ module ActiveRecord
128
128
  conditions << sanitize_sql(options.delete(:conditions)) if options[:conditions]
129
129
 
130
130
  unless (on = options.delete(:on)).nil?
131
- conditions << sanitize_sql(["#{Tagging.table_name}.context = ?",on.to_s])
131
+ conditions << sanitize_sql(["context = ?",on.to_s])
132
132
  end
133
133
 
134
134
  taggings_alias, tags_alias = "#{table_name}_taggings", "#{table_name}_tags"
@@ -183,7 +183,7 @@ module ActiveRecord
183
183
  conditions = merge_conditions(conditions, scope[:conditions]) if scope
184
184
 
185
185
  joins = ["LEFT OUTER JOIN #{Tagging.table_name} ON #{Tag.table_name}.id = #{Tagging.table_name}.tag_id"]
186
- joins << sanitize_sql(["AND #{Tagging.table_name}.context = ?",options.delete(:on).to_s]) unless options[:on].nil?
186
+ joins << sanitize_sql(["AND context = ?",options.delete(:on).to_s]) unless options[:on].nil?
187
187
  joins << "LEFT OUTER JOIN #{table_name} ON #{table_name}.#{primary_key} = #{Tagging.table_name}.taggable_id"
188
188
  joins << scope[:joins] if scope && scope[:joins]
189
189
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: yury-acts-as-taggable-on
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.2
4
+ version: 1.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Michael Bleigh