friendly_id 5.0.0 → 5.0.1
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.
- checksums.yaml +4 -4
- data/Changelog.md +4 -0
- data/lib/friendly_id/base.rb +1 -1
- data/lib/friendly_id/version.rb +1 -1
- data/test/shared.rb +7 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 558d42d05561510d3b878d6c55a99eaac461d189
|
4
|
+
data.tar.gz: b56ebd579507441df27d8aa42e0b837d2ce0fc60
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0e11d6d309df06e6177eb24c03af2aff0f3119f5c545b15e8088599d19f62242266e71c01aa69beda1ccb2c4b8a113a651fdb25ab10ef54b856a552284bd02dd
|
7
|
+
data.tar.gz: 0eef987342060880f7d713948f8f12e04e90efbe89059e34debda4a78026989170538410ba9b981feaaf5df424fa8e475bfe51492049372dae4a023faad385c9
|
data/Changelog.md
CHANGED
@@ -3,6 +3,10 @@
|
|
3
3
|
We would like to think our many {file:Contributors contributors} for
|
4
4
|
suggestions, ideas and improvements to FriendlyId.
|
5
5
|
|
6
|
+
## 5.0.1 (2013-10-27)
|
7
|
+
|
8
|
+
* Fix compatibility with Rails 4.0.1.rc3 (thanks [Herman verschooten](https://github.com/Hermanverschooten)).
|
9
|
+
|
6
10
|
## 5.0.0 (2013-10-16)
|
7
11
|
|
8
12
|
* Fix to let scoped records reuse their slugs (thanks [Donny
|
data/lib/friendly_id/base.rb
CHANGED
@@ -243,7 +243,7 @@ often better and easier to use {FriendlyId::Slugged slugs}.
|
|
243
243
|
if diff = changes[friendly_id_config.query_field]
|
244
244
|
diff.first || diff.second
|
245
245
|
else
|
246
|
-
friendly_id.presence || super
|
246
|
+
friendly_id.presence.to_param || super
|
247
247
|
end
|
248
248
|
end
|
249
249
|
end
|
data/lib/friendly_id/version.rb
CHANGED
data/test/shared.rb
CHANGED
@@ -151,6 +151,13 @@ module FriendlyId
|
|
151
151
|
end
|
152
152
|
end
|
153
153
|
|
154
|
+
test "should return the friendly_id as a string" do
|
155
|
+
with_instance_of(model_class) do |record|
|
156
|
+
record.expects(:friendly_id).returns(5)
|
157
|
+
assert_equal "5", record.to_param
|
158
|
+
end
|
159
|
+
end
|
160
|
+
|
154
161
|
test "should return numeric id if the friendly_id is blank" do
|
155
162
|
with_instance_of(model_class) do |record|
|
156
163
|
record.expects(:friendly_id).returns(" ")
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: friendly_id
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 5.0.
|
4
|
+
version: 5.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Norman Clarke
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2013-10-
|
12
|
+
date: 2013-10-27 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: activerecord
|