friendly_id 3.0.0.beta2 → 3.0.0.beta3
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/friendly_id/railtie.rb +2 -5
- data/lib/friendly_id/sequel.rb +5 -0
- data/lib/friendly_id/test.rb +3 -2
- data/lib/friendly_id/version.rb +1 -1
- data/lib/friendly_id.rb +1 -0
- metadata +3 -2
data/lib/friendly_id/railtie.rb
CHANGED
@@ -4,11 +4,7 @@ module FriendlyId
|
|
4
4
|
initializer "friendly_id.configure_rails_initialization" do |app|
|
5
5
|
# Experimental Sequel support. See: http://github.com/norman/friendly_id_sequel
|
6
6
|
if app.config.generators.rails[:orm] == :sequel
|
7
|
-
|
8
|
-
require "friendly_id/sequel"
|
9
|
-
rescue LoadError
|
10
|
-
raise "To use FriendlyId's Sequel adapter, please 'gem install friendly_id_sequel'"
|
11
|
-
end
|
7
|
+
require "friendly_id/sequel"
|
12
8
|
else
|
13
9
|
# Only Sequel and ActiveRecord are currently supported; AR is the default.
|
14
10
|
# Want Datamapper support? http://github.com/norman/friendly_id/issues#issue/24
|
@@ -19,5 +15,6 @@ module FriendlyId
|
|
19
15
|
rake_tasks do
|
20
16
|
load "tasks/friendly_id.rake"
|
21
17
|
end
|
18
|
+
|
22
19
|
end
|
23
20
|
end
|
data/lib/friendly_id/test.rb
CHANGED
@@ -172,9 +172,10 @@ module FriendlyId
|
|
172
172
|
|
173
173
|
test "should remain findable by previous slugs" do
|
174
174
|
old_friendly_id = instance.friendly_id
|
175
|
-
instance.
|
175
|
+
instance.name = "#{old_friendly_id} updated"
|
176
|
+
instance.send(save_method)
|
176
177
|
assert_not_equal old_friendly_id, instance.friendly_id
|
177
|
-
assert_equal instance, klass.
|
178
|
+
assert_equal instance, klass.send(find_method, old_friendly_id)
|
178
179
|
end
|
179
180
|
|
180
181
|
test "should not create a slug when allow_nil is true and friendy_id text is blank" do
|
data/lib/friendly_id/version.rb
CHANGED
data/lib/friendly_id.rb
CHANGED
metadata
CHANGED
@@ -6,8 +6,8 @@ version: !ruby/object:Gem::Version
|
|
6
6
|
- 3
|
7
7
|
- 0
|
8
8
|
- 0
|
9
|
-
-
|
10
|
-
version: 3.0.0.
|
9
|
+
- beta3
|
10
|
+
version: 3.0.0.beta3
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Norman Clarke
|
@@ -68,6 +68,7 @@ files:
|
|
68
68
|
- lib/friendly_id/configuration.rb
|
69
69
|
- lib/friendly_id/finders.rb
|
70
70
|
- lib/friendly_id/railtie.rb
|
71
|
+
- lib/friendly_id/sequel.rb
|
71
72
|
- lib/friendly_id/slug_string.rb
|
72
73
|
- lib/friendly_id/slugged.rb
|
73
74
|
- lib/friendly_id/status.rb
|