seofy 0.1.3 → 0.1.4
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/seofy/task_runner.rb +1 -1
- data/lib/seofy/version.rb +1 -1
- data/spec/lib/seofy/task_runner_spec.rb +3 -1
- metadata +3 -3
data/lib/seofy/task_runner.rb
CHANGED
@@ -34,7 +34,7 @@ module Seofy
|
|
34
34
|
def update(record)
|
35
35
|
adapter = record.class.seofy_adapter
|
36
36
|
adapter.set_seofy_slug(record)
|
37
|
-
record.class.update_all(["#{adapter.column} = ?", adapter.seofy_slug(record)], ['id = ?', record.id])
|
37
|
+
record.class.unscoped.update_all(["#{adapter.column} = ?", adapter.seofy_slug(record)], ['id = ?', record.id])
|
38
38
|
end
|
39
39
|
end
|
40
40
|
end
|
data/lib/seofy/version.rb
CHANGED
@@ -17,12 +17,14 @@ describe Seofy::TaskRunner do
|
|
17
17
|
s1.reload.should_not == slug1
|
18
18
|
end
|
19
19
|
it "should ignore default_scope" do
|
20
|
+
puts "*" * 100
|
20
21
|
s1 = Store.create!(:title => "store 1", :deleted => 1)
|
21
22
|
slug1 = s1.slug
|
22
23
|
ENV["MODELS"] = "Store"
|
23
24
|
Seofy::TaskRunner.new.update_all
|
24
|
-
Store.unscoped.find(s1.id).
|
25
|
+
Store.unscoped.find(s1.id).slug.should_not == slug1
|
25
26
|
|
27
|
+
puts "*" * 100
|
26
28
|
end
|
27
29
|
end
|
28
30
|
|
metadata
CHANGED