friendly_id 5.0.0 → 5.0.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: be471c9fdfbd158f951d1544207aa7adb87e0595
4
- data.tar.gz: e2abb7c2074fbdfd5445e47e6ba01ae9a37a72d0
3
+ metadata.gz: 558d42d05561510d3b878d6c55a99eaac461d189
4
+ data.tar.gz: b56ebd579507441df27d8aa42e0b837d2ce0fc60
5
5
  SHA512:
6
- metadata.gz: d97900b4d53ef7d02a48665386e97bee42b2aceed5283209246bdc249e2467d40268b08bde9805bc3d0aa7d78eac9500ad83ff39302d6c43df804f298b0cf86e
7
- data.tar.gz: 661f24ec624dcca17544c5ccf72cb708f8261fc31f06312110c44a6aafbb47c30f56068a8e38c77df2115d875839a6be100818b73beec7f4f74070bbb6565995
6
+ metadata.gz: 0e11d6d309df06e6177eb24c03af2aff0f3119f5c545b15e8088599d19f62242266e71c01aa69beda1ccb2c4b8a113a651fdb25ab10ef54b856a552284bd02dd
7
+ data.tar.gz: 0eef987342060880f7d713948f8f12e04e90efbe89059e34debda4a78026989170538410ba9b981feaaf5df424fa8e475bfe51492049372dae4a023faad385c9
@@ -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
@@ -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
@@ -1,3 +1,3 @@
1
1
  module FriendlyId
2
- VERSION = "5.0.0"
2
+ VERSION = "5.0.1"
3
3
  end
@@ -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.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-16 00:00:00.000000000 Z
12
+ date: 2013-10-27 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: activerecord