friendly_id 3.0.5 → 3.0.6
Sign up to get free protection for your applications and to get access to all the features.
- data/Changelog.md +4 -0
- data/lib/friendly_id/slug_string.rb +8 -2
- data/lib/friendly_id/version.rb +1 -1
- data/test/active_record_adapter/ar_test_helper.rb +1 -1
- data/test/test_helper.rb +1 -1
- metadata +3 -3
data/Changelog.md
CHANGED
@@ -206,7 +206,13 @@ module FriendlyId
|
|
206
206
|
# though your milage may vary with Greek and Turkic strings.
|
207
207
|
# @return String
|
208
208
|
def downcase!
|
209
|
-
@wrapped_string =
|
209
|
+
@wrapped_string = apply_mapping :lowercase_mapping
|
210
|
+
end
|
211
|
+
|
212
|
+
if defined? ActiveSupport::Multibyte::Unicode
|
213
|
+
def apply_mapping(*args)
|
214
|
+
ActiveSupport::Multibyte::Unicode.apply_mapping(@wrapped_string, *args)
|
215
|
+
end
|
210
216
|
end
|
211
217
|
|
212
218
|
# Remove any non-word characters.
|
@@ -333,7 +339,7 @@ module FriendlyId
|
|
333
339
|
# though your milage may vary with Greek and Turkic strings.
|
334
340
|
# @return String
|
335
341
|
def upcase!
|
336
|
-
@wrapped_string =
|
342
|
+
@wrapped_string = apply_mapping :uppercase_mapping
|
337
343
|
end
|
338
344
|
|
339
345
|
# Validate that the slug string is not blank or reserved, and truncate
|
data/lib/friendly_id/version.rb
CHANGED
@@ -38,7 +38,7 @@ end
|
|
38
38
|
class Region < ActiveRecord::Base
|
39
39
|
has_friendly_id :name, :use_slug => true
|
40
40
|
after_create do |obj|
|
41
|
-
other_instance =
|
41
|
+
other_instance = Region.find obj.id
|
42
42
|
other_instance.update_attributes :note => name + "!"
|
43
43
|
end
|
44
44
|
end
|
data/test/test_helper.rb
CHANGED
metadata
CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
|
|
5
5
|
segments:
|
6
6
|
- 3
|
7
7
|
- 0
|
8
|
-
-
|
9
|
-
version: 3.0.
|
8
|
+
- 6
|
9
|
+
version: 3.0.6
|
10
10
|
platform: ruby
|
11
11
|
authors:
|
12
12
|
- Norman Clarke
|
@@ -16,7 +16,7 @@ autorequire:
|
|
16
16
|
bindir: bin
|
17
17
|
cert_chain: []
|
18
18
|
|
19
|
-
date: 2010-06-
|
19
|
+
date: 2010-06-11 00:00:00 -04:00
|
20
20
|
default_executable:
|
21
21
|
dependencies:
|
22
22
|
- !ruby/object:Gem::Dependency
|