Commit 31fdbc17f07401adba119f62a15c17c0928429ed
1 parent
1846267f
Exists in
master
and in
29 other branches
ActionItem93: putting acts_as_versioned again; the problem was that acts_as_file…
…system was returning false in an ActiveRecord callback git-svn-id: https://svn.colivre.coop.br/svn/noosfero/trunk@944 3f533792-8f58-4932-b0fe-aaf55b0a4547
Showing
2 changed files
with
4 additions
and
2 deletions
Show diff stats
lib/acts_as_filesystem.rb
... | ... | @@ -24,6 +24,7 @@ module ActsAsFileSystem |
24 | 24 | if record.path == record.slug && (! record.top_level?) |
25 | 25 | record.path = record.calculate_path |
26 | 26 | end |
27 | + true | |
27 | 28 | end |
28 | 29 | |
29 | 30 | # when renaming a category, all children categories must have their paths |
... | ... | @@ -37,6 +38,7 @@ module ActsAsFileSystem |
37 | 38 | end |
38 | 39 | end |
39 | 40 | record.recalculate_path = false |
41 | + true | |
40 | 42 | end |
41 | 43 | |
42 | 44 | end | ... | ... |
test/unit/article_test.rb
... | ... | @@ -33,10 +33,10 @@ class ArticleTest < Test::Unit::TestCase |
33 | 33 | |
34 | 34 | should 'act as versioned' do |
35 | 35 | a = Article.create!(:name => 'my article', :body => 'my text', :profile_id => profile.id) |
36 | - assert_equal 1, a.versions.size | |
36 | + assert_equal 1, a.versions(true).size | |
37 | 37 | a.name = 'some other name' |
38 | 38 | a.save! |
39 | - assert_equal 2, a.versions.size | |
39 | + assert_equal 2, a.versions(true).size | |
40 | 40 | end |
41 | 41 | |
42 | 42 | should 'act as taggable' do | ... | ... |