Commit 0de69f91a0ca14adca0f4241f539339a586564de

Authored by AntonioTerceiro
1 parent fa8ef8f7

ActionItem152: renaming callback


git-svn-id: https://svn.colivre.coop.br/svn/noosfero/trunk@1218 3f533792-8f58-4932-b0fe-aaf55b0a4547
Showing 1 changed file with 4 additions and 2 deletions   Show diff stats
app/models/profile.rb
@@ -82,16 +82,18 @@ class Profile < ActiveRecord::Base @@ -82,16 +82,18 @@ class Profile < ActiveRecord::Base
82 end 82 end
83 83
84 # registar callback for creating boxes after the object is created. 84 # registar callback for creating boxes after the object is created.
85 - after_create :create_boxes 85 + after_create :create_default_set_of_boxes
86 86
87 # creates the initial set of boxes when the profile is created. Can be 87 # creates the initial set of boxes when the profile is created. Can be
88 # overriden for each subclass to create a custom set of boxes for its 88 # overriden for each subclass to create a custom set of boxes for its
89 # instances. 89 # instances.
90 - def create_boxes 90 + def create_default_set_of_boxes
91 3.times do 91 3.times do
92 self.boxes << Box.new 92 self.boxes << Box.new
93 end 93 end
94 self.boxes.first.blocks << MainBlock.new 94 self.boxes.first.blocks << MainBlock.new
  95 +
  96 + true
95 end 97 end
96 98
97 # Returns information about the profile's owner that was made public by 99 # Returns information about the profile's owner that was made public by