has_handle_fallback 0.0.12 → 0.0.13

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. data/VERSION +1 -1
  2. data/lib/has_handle_fallback.rb +3 -3
  3. metadata +15 -4
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.0.12
1
+ 0.0.13
@@ -47,7 +47,7 @@ module HasHandleFallback
47
47
  if param =~ HasHandleFallback::RECORD_ID_REGEXP
48
48
  find_by_id param
49
49
  else
50
- first :conditions => [ "LOWER(#{quoted_table_name}.`#{has_handle_fallback_options[:handle_column]}`) = ?", param.downcase ]
50
+ first :conditions => [ "#{quoted_table_name}.`#{has_handle_fallback_options[:handle_column]}` LIKE ?", param ]
51
51
  end
52
52
  end
53
53
  alias :[] :find_by_id_or_handle
@@ -91,11 +91,11 @@ module HasHandleFallback
91
91
  end
92
92
 
93
93
  # validates_uniqueness_of :handle, :case_sensitive => false, :allow_nil => true
94
- if new_record? and self.class.exists? [ "LOWER(#{self.class.quoted_table_name}.`#{self.class.has_handle_fallback_options[:handle_column]}`) = ?", raw.downcase ]
94
+ if new_record? and self.class.exists? [ "#{self.class.quoted_table_name}.`#{self.class.has_handle_fallback_options[:handle_column]}` LIKE ?", raw ]
95
95
  errors.add self.class.has_handle_fallback_options[:handle_column], "isn't unique"
96
96
  end
97
97
 
98
- if !new_record? and self.class.exists? [ "#{self.class.quoted_table_name}.`#{self.class.primary_key}` <> ? AND LOWER(#{self.class.quoted_table_name}.`#{self.class.has_handle_fallback_options[:handle_column]}`) = ?", id, raw.downcase ]
98
+ if !new_record? and self.class.exists? [ "#{self.class.quoted_table_name}.`#{self.class.primary_key}` <> ? AND #{self.class.quoted_table_name}.`#{self.class.has_handle_fallback_options[:handle_column]}` LIKE ?", id, raw ]
99
99
  errors.add self.class.has_handle_fallback_options[:handle_column], "isn't unique"
100
100
  end
101
101
  end
metadata CHANGED
@@ -1,12 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: has_handle_fallback
3
3
  version: !ruby/object:Gem::Version
4
+ hash: 5
4
5
  prerelease: false
5
6
  segments:
6
7
  - 0
7
8
  - 0
8
- - 12
9
- version: 0.0.12
9
+ - 13
10
+ version: 0.0.13
10
11
  platform: ruby
11
12
  authors:
12
13
  - Seamus Abshere
@@ -14,16 +15,18 @@ autorequire:
14
15
  bindir: bin
15
16
  cert_chain: []
16
17
 
17
- date: 2010-05-04 00:00:00 -04:00
18
+ date: 2010-06-10 00:00:00 -04:00
18
19
  default_executable:
19
20
  dependencies:
20
21
  - !ruby/object:Gem::Dependency
21
22
  name: activesupport
22
23
  prerelease: false
23
24
  requirement: &id001 !ruby/object:Gem::Requirement
25
+ none: false
24
26
  requirements:
25
27
  - - ">="
26
28
  - !ruby/object:Gem::Version
29
+ hash: 11
27
30
  segments:
28
31
  - 2
29
32
  - 3
@@ -35,9 +38,11 @@ dependencies:
35
38
  name: activerecord
36
39
  prerelease: false
37
40
  requirement: &id002 !ruby/object:Gem::Requirement
41
+ none: false
38
42
  requirements:
39
43
  - - ">="
40
44
  - !ruby/object:Gem::Version
45
+ hash: 11
41
46
  segments:
42
47
  - 2
43
48
  - 3
@@ -49,9 +54,11 @@ dependencies:
49
54
  name: validates_decency_of
50
55
  prerelease: false
51
56
  requirement: &id003 !ruby/object:Gem::Requirement
57
+ none: false
52
58
  requirements:
53
59
  - - ">="
54
60
  - !ruby/object:Gem::Version
61
+ hash: 1
55
62
  segments:
56
63
  - 1
57
64
  - 5
@@ -88,23 +95,27 @@ rdoc_options:
88
95
  require_paths:
89
96
  - lib
90
97
  required_ruby_version: !ruby/object:Gem::Requirement
98
+ none: false
91
99
  requirements:
92
100
  - - ">="
93
101
  - !ruby/object:Gem::Version
102
+ hash: 3
94
103
  segments:
95
104
  - 0
96
105
  version: "0"
97
106
  required_rubygems_version: !ruby/object:Gem::Requirement
107
+ none: false
98
108
  requirements:
99
109
  - - ">="
100
110
  - !ruby/object:Gem::Version
111
+ hash: 3
101
112
  segments:
102
113
  - 0
103
114
  version: "0"
104
115
  requirements: []
105
116
 
106
117
  rubyforge_project:
107
- rubygems_version: 1.3.6
118
+ rubygems_version: 1.3.7
108
119
  signing_key:
109
120
  specification_version: 3
110
121
  summary: Make it easy to use handles (callsigns/monikers/usernames) in URLs, even if they might be blank.