Commit 8238d31de4fe232cd77d26dd327f14b7bba8a347

Authored by AntonioTerceiro
1 parent fd983d96

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
app/models/article_block.rb
... ... @@ -4,7 +4,7 @@ class ArticleBlock < Block
4 4 _('Display one of your contents.')
5 5 end
6 6  
7   - def content(main = nil)
  7 + def content
8 8 article ? article.to_html : _('Article not selected yet.')
9 9 end
10 10  
... ...
app/models/block.rb
... ... @@ -26,7 +26,7 @@ class Block < ActiveRecord::Base
26 26 _('A dummy block.')
27 27 end
28 28  
29   - def content(main_content = nil)
  29 + def content
30 30 "This is block number %d" % self.id
31 31 end
32 32  
... ...
app/models/main_block.rb
... ... @@ -4,7 +4,7 @@ class MainBlock < Block
4 4 _('Block for main content (i.e. your articles, photos, etc)')
5 5 end
6 6  
7   - def content(main_content = nil)
  7 + def content
8 8 main_content
9 9 end
10 10  
... ...
app/models/tags_block.rb
... ... @@ -7,7 +7,7 @@ class TagsBlock < Block
7 7 _('List count of contents by tag')
8 8 end
9 9  
10   - def content(main_content = nil)
  10 + def content
11 11 content_tag('h3', _('Tags'), :class => 'block-title') +
12 12 tag_cloud(owner.tags, :id, owner.generate_url(:controller => 'profile', :action => 'tag') + '/', :max_size => 20, :min_size => 10)
13 13 end
... ...