Commit 19bc7ee155e0477e790dc93f608c6b98dfb2f6a4
1 parent
3465dd97
Exists in
master
and in
27 other branches
rails3: fix merge problem on recent_documents
Showing
1 changed file
with
2 additions
and
2 deletions
Show diff stats
app/models/recent_documents_block.rb
@@ -15,11 +15,11 @@ class RecentDocumentsBlock < Block | @@ -15,11 +15,11 @@ class RecentDocumentsBlock < Block | ||
15 | settings_items :limit, :type => :integer, :default => 5 | 15 | settings_items :limit, :type => :integer, :default => 5 |
16 | 16 | ||
17 | def content(args={}) | 17 | def content(args={}) |
18 | - docs = self.docs | 18 | + docs = self.limit.nil? ? owner.recent_documents(nil, {}, false) : owner.recent_documents(self.limit, {}, false) |
19 | title = self.title | 19 | title = self.title |
20 | proc do | 20 | proc do |
21 | block_title(title) + | 21 | block_title(title) + |
22 | - content_tag('ul', docs.map {|item| content_tag('li', link_to(h(item.title), item.url))}.join("\n")) | 22 | + content_tag('ul', docs.map {|item| content_tag('li', link_to(h(item.title), item.url))}.join("\n")) |
23 | end | 23 | end |
24 | end | 24 | end |
25 | 25 |