Commit 36cfad76d31457c91c8575c579de536180c06d9f

Authored by AntonioTerceiro
1 parent 4bd17eba

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
app/models/organization.rb
... ... @@ -56,7 +56,7 @@ class Organization < Profile
56 56 hacked_after_create :create_default_set_of_blocks_for_organization
57 57 def create_default_set_of_blocks_for_organization
58 58 # "main" area
59   - # nothing ..., MainBlock is already there
  59 + self.boxes[0].blocks << MainBlock.new
60 60  
61 61 # "left" area
62 62 self.boxes[1].blocks << ProfileInfoBlock.new
... ...
app/models/profile.rb
... ... @@ -105,8 +105,6 @@ class Profile &lt; ActiveRecord::Base
105 105 3.times do
106 106 self.boxes << Box.new
107 107 end
108   - self.boxes.first.blocks << MainBlock.new
109   -
110 108 true
111 109 end
112 110  
... ...