Commit 8238d31de4fe232cd77d26dd327f14b7bba8a347
1 parent
fd983d96
Exists in
master
and in
29 other branches
ActionItem152: removing the optional parameter from content method
git-svn-id: https://svn.colivre.coop.br/svn/noosfero/trunk@1262 3f533792-8f58-4932-b0fe-aaf55b0a4547
Showing
4 changed files
with
4 additions
and
4 deletions
Show diff stats
app/models/article_block.rb
@@ -4,7 +4,7 @@ class ArticleBlock < Block | @@ -4,7 +4,7 @@ class ArticleBlock < Block | ||
4 | _('Display one of your contents.') | 4 | _('Display one of your contents.') |
5 | end | 5 | end |
6 | 6 | ||
7 | - def content(main = nil) | 7 | + def content |
8 | article ? article.to_html : _('Article not selected yet.') | 8 | article ? article.to_html : _('Article not selected yet.') |
9 | end | 9 | end |
10 | 10 |
app/models/block.rb
@@ -26,7 +26,7 @@ class Block < ActiveRecord::Base | @@ -26,7 +26,7 @@ class Block < ActiveRecord::Base | ||
26 | _('A dummy block.') | 26 | _('A dummy block.') |
27 | end | 27 | end |
28 | 28 | ||
29 | - def content(main_content = nil) | 29 | + def content |
30 | "This is block number %d" % self.id | 30 | "This is block number %d" % self.id |
31 | end | 31 | end |
32 | 32 |
app/models/main_block.rb
@@ -4,7 +4,7 @@ class MainBlock < Block | @@ -4,7 +4,7 @@ class MainBlock < Block | ||
4 | _('Block for main content (i.e. your articles, photos, etc)') | 4 | _('Block for main content (i.e. your articles, photos, etc)') |
5 | end | 5 | end |
6 | 6 | ||
7 | - def content(main_content = nil) | 7 | + def content |
8 | main_content | 8 | main_content |
9 | end | 9 | end |
10 | 10 |
app/models/tags_block.rb
@@ -7,7 +7,7 @@ class TagsBlock < Block | @@ -7,7 +7,7 @@ class TagsBlock < Block | ||
7 | _('List count of contents by tag') | 7 | _('List count of contents by tag') |
8 | end | 8 | end |
9 | 9 | ||
10 | - def content(main_content = nil) | 10 | + def content |
11 | content_tag('h3', _('Tags'), :class => 'block-title') + | 11 | content_tag('h3', _('Tags'), :class => 'block-title') + |
12 | tag_cloud(owner.tags, :id, owner.generate_url(:controller => 'profile', :action => 'tag') + '/', :max_size => 20, :min_size => 10) | 12 | tag_cloud(owner.tags, :id, owner.generate_url(:controller => 'profile', :action => 'tag') + '/', :max_size => 20, :min_size => 10) |
13 | end | 13 | end |