friendly_id 3.3.2.0 → 3.3.3.0
Sign up to get free protection for your applications and to get access to all the features.
data/Changelog.md
CHANGED
@@ -6,6 +6,10 @@ suggestions, ideas and improvements to FriendlyId.
|
|
6
6
|
* Table of Contents
|
7
7
|
{:toc}
|
8
8
|
|
9
|
+
## 3.1.3 (2012-04-28)
|
10
|
+
|
11
|
+
* Fix for sequenced scoped slugs ([Louise Crow](https://github.com/crowbot))
|
12
|
+
|
9
13
|
## 3.1.2 (2012-01-24)
|
10
14
|
|
11
15
|
* Fix for 3.2 support ([Philip Arndt](https://github.com/parndt))
|
data/lib/friendly_id/version.rb
CHANGED
@@ -64,6 +64,15 @@ module FriendlyId
|
|
64
64
|
assert_equal "canada", @resident.slugs(true).first.scope
|
65
65
|
end
|
66
66
|
|
67
|
+
test "updating the scope should increment sequence correctly when there's more than one
|
68
|
+
existing slug in scope" do
|
69
|
+
resident4 = Resident.create!(:name => "John Smith", :country => @canada)
|
70
|
+
old_friendly_id = @resident.friendly_id
|
71
|
+
@resident.update_attributes! :country => @canada
|
72
|
+
assert_equal "#{old_friendly_id}--3", @resident.friendly_id
|
73
|
+
assert_equal "canada", @resident.slugs(true).first.scope
|
74
|
+
end
|
75
|
+
|
67
76
|
test "a non-slugged model should update its child model's scopes when its friendly_id changes" do
|
68
77
|
@user.update_attributes(:name => "jack")
|
69
78
|
assert_equal "jack", @user.to_param
|
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: 3.3.
|
4
|
+
version: 3.3.3.0
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -11,11 +11,11 @@ authors:
|
|
11
11
|
autorequire:
|
12
12
|
bindir: bin
|
13
13
|
cert_chain: []
|
14
|
-
date: 2012-
|
14
|
+
date: 2012-04-28 00:00:00.000000000 Z
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
17
17
|
name: babosa
|
18
|
-
requirement: &
|
18
|
+
requirement: &70213652491800 !ruby/object:Gem::Requirement
|
19
19
|
none: false
|
20
20
|
requirements:
|
21
21
|
- - ~>
|
@@ -23,10 +23,10 @@ dependencies:
|
|
23
23
|
version: 0.3.0
|
24
24
|
type: :runtime
|
25
25
|
prerelease: false
|
26
|
-
version_requirements: *
|
26
|
+
version_requirements: *70213652491800
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: activerecord
|
29
|
-
requirement: &
|
29
|
+
requirement: &70213652491280 !ruby/object:Gem::Requirement
|
30
30
|
none: false
|
31
31
|
requirements:
|
32
32
|
- - ! '>='
|
@@ -37,10 +37,10 @@ dependencies:
|
|
37
37
|
version: '3.3'
|
38
38
|
type: :development
|
39
39
|
prerelease: false
|
40
|
-
version_requirements: *
|
40
|
+
version_requirements: *70213652491280
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: mocha
|
43
|
-
requirement: &
|
43
|
+
requirement: &70213652490560 !ruby/object:Gem::Requirement
|
44
44
|
none: false
|
45
45
|
requirements:
|
46
46
|
- - ~>
|
@@ -48,10 +48,10 @@ dependencies:
|
|
48
48
|
version: '0.9'
|
49
49
|
type: :development
|
50
50
|
prerelease: false
|
51
|
-
version_requirements: *
|
51
|
+
version_requirements: *70213652490560
|
52
52
|
- !ruby/object:Gem::Dependency
|
53
53
|
name: sqlite3
|
54
|
-
requirement: &
|
54
|
+
requirement: &70213652490100 !ruby/object:Gem::Requirement
|
55
55
|
none: false
|
56
56
|
requirements:
|
57
57
|
- - ~>
|
@@ -59,10 +59,10 @@ dependencies:
|
|
59
59
|
version: '1.3'
|
60
60
|
type: :development
|
61
61
|
prerelease: false
|
62
|
-
version_requirements: *
|
62
|
+
version_requirements: *70213652490100
|
63
63
|
- !ruby/object:Gem::Dependency
|
64
64
|
name: rake
|
65
|
-
requirement: &
|
65
|
+
requirement: &70213652489640 !ruby/object:Gem::Requirement
|
66
66
|
none: false
|
67
67
|
requirements:
|
68
68
|
- - ~>
|
@@ -70,7 +70,7 @@ dependencies:
|
|
70
70
|
version: 0.9.2
|
71
71
|
type: :development
|
72
72
|
prerelease: false
|
73
|
-
version_requirements: *
|
73
|
+
version_requirements: *70213652489640
|
74
74
|
description: ! " FriendlyId is the \"Swiss Army bulldozer\" of slugging and permalink
|
75
75
|
plugins\n for Ruby on Rails. It allows you to create pretty URL's and work with\n
|
76
76
|
\ human-friendly strings as if they were numeric ids for ActiveRecord models.\n"
|
@@ -155,15 +155,21 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
155
155
|
- - ! '>='
|
156
156
|
- !ruby/object:Gem::Version
|
157
157
|
version: '0'
|
158
|
+
segments:
|
159
|
+
- 0
|
160
|
+
hash: 1898456187298114319
|
158
161
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
159
162
|
none: false
|
160
163
|
requirements:
|
161
164
|
- - ! '>='
|
162
165
|
- !ruby/object:Gem::Version
|
163
166
|
version: '0'
|
167
|
+
segments:
|
168
|
+
- 0
|
169
|
+
hash: 1898456187298114319
|
164
170
|
requirements: []
|
165
171
|
rubyforge_project: friendly-id
|
166
|
-
rubygems_version: 1.8.
|
172
|
+
rubygems_version: 1.8.11
|
167
173
|
signing_key:
|
168
174
|
specification_version: 3
|
169
175
|
summary: A comprehensive slugging and pretty-URL plugin.
|