e9_tags 0.0.13 → 0.0.14

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.
@@ -22,6 +22,10 @@ module E9Tags::Rack
22
22
  relation = relation.where(taggings[:context].matches(E9Tags.escape_context(@context)))
23
23
  end
24
24
 
25
+ if @except = @params['except']
26
+ relation = relation.where(tags[:name].not_in(@except))
27
+ end
28
+
25
29
  # NOTE this select is stolen from Arel::SelectManager's deprecated to_a method, but since Arel has been re-written
26
30
  # (and even before that) it'd probably be smarter here to avoid arel tables and just use AR and to_json
27
31
  #
@@ -26,7 +26,7 @@ module E9Tags
26
26
 
27
27
  module ClassMethods
28
28
  def contexts(options = {})
29
- scope = arel_table.project(:context)
29
+ scope = select("DISTINCT #{table_name}.context")
30
30
 
31
31
  if !options[:show_all]
32
32
  condition = arel_table[:context].matches('%__H__')
@@ -34,7 +34,7 @@ module E9Tags
34
34
  scope = scope.where(condition)
35
35
  end
36
36
 
37
- scope.map {|row| row.tuple.first }.uniq
37
+ connection.select_values(scope.to_sql)
38
38
  end
39
39
  end
40
40
  end
@@ -1,3 +1,3 @@
1
1
  module E9Tags
2
- VERSION = "0.0.13"
2
+ VERSION = "0.0.14"
3
3
  end
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: e9_tags
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 0.0.13
5
+ version: 0.0.14
6
6
  platform: ruby
7
7
  authors:
8
8
  - Travis Cox
@@ -10,8 +10,7 @@ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
12
 
13
- date: 2011-07-20 00:00:00 -04:00
14
- default_executable:
13
+ date: 2011-10-07 00:00:00 Z
15
14
  dependencies:
16
15
  - !ruby/object:Gem::Dependency
17
16
  name: rails
@@ -130,7 +129,6 @@ files:
130
129
  - lib/e9_tags/version.rb
131
130
  - lib/generators/e9_tags/install_generator.rb
132
131
  - lib/generators/e9_tags/templates/e9_tags.js
133
- has_rdoc: true
134
132
  homepage: http://github.com/e9digital/e9_tags
135
133
  licenses: []
136
134
 
@@ -154,7 +152,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
154
152
  requirements: []
155
153
 
156
154
  rubyforge_project: e9_tags
157
- rubygems_version: 1.6.2
155
+ rubygems_version: 1.8.10
158
156
  signing_key:
159
157
  specification_version: 3
160
158
  summary: Extension to ActsAsTaggableOn used in e9 Rails 3 projects