Commit 36cfad76d31457c91c8575c579de536180c06d9f
1 parent
4bd17eba
Exists in
master
and in
29 other branches
ActionItem154: making the block creation callbacks self-contained.
git-svn-id: https://svn.colivre.coop.br/svn/noosfero/trunk@1413 3f533792-8f58-4932-b0fe-aaf55b0a4547
Showing
2 changed files
with
1 additions
and
3 deletions
Show diff stats
app/models/organization.rb
@@ -56,7 +56,7 @@ class Organization < Profile | @@ -56,7 +56,7 @@ class Organization < Profile | ||
56 | hacked_after_create :create_default_set_of_blocks_for_organization | 56 | hacked_after_create :create_default_set_of_blocks_for_organization |
57 | def create_default_set_of_blocks_for_organization | 57 | def create_default_set_of_blocks_for_organization |
58 | # "main" area | 58 | # "main" area |
59 | - # nothing ..., MainBlock is already there | 59 | + self.boxes[0].blocks << MainBlock.new |
60 | 60 | ||
61 | # "left" area | 61 | # "left" area |
62 | self.boxes[1].blocks << ProfileInfoBlock.new | 62 | self.boxes[1].blocks << ProfileInfoBlock.new |
app/models/profile.rb
@@ -105,8 +105,6 @@ class Profile < ActiveRecord::Base | @@ -105,8 +105,6 @@ class Profile < ActiveRecord::Base | ||
105 | 3.times do | 105 | 3.times do |
106 | self.boxes << Box.new | 106 | self.boxes << Box.new |
107 | end | 107 | end |
108 | - self.boxes.first.blocks << MainBlock.new | ||
109 | - | ||
110 | true | 108 | true |
111 | end | 109 | end |
112 | 110 |