Commit ebe5293ee8867446b7132d765f82e604d8a1d3fc

Authored by MoisesMachado
1 parent bc7115d5

ActionItem261: added dots to mark progress


git-svn-id: https://svn.colivre.coop.br/svn/noosfero/trunk@1947 3f533792-8f58-4932-b0fe-aaf55b0a4547
Showing 1 changed file with 4 additions and 2 deletions   Show diff stats
script/fbes_populate_helper.rb
@@ -32,14 +32,16 @@ require File.dirname(__FILE__) + '/../config/environment' @@ -32,14 +32,16 @@ require File.dirname(__FILE__) + '/../config/environment'
32 32
33 def new_cat(name, parent = nil) 33 def new_cat(name, parent = nil)
34 path = (parent ? parent.path + '/' : '') + name.to_slug 34 path = (parent ? parent.path + '/' : '') + name.to_slug
35 - ProductCategory.find_by_path(path) || ProductCategory.create!(:name => name, :parent => parent, :environment => Environment.default) 35 + pc = ProductCategory.find_by_path(path) || ProductCategory.create!(:name => name, :parent => parent, :environment => Environment.default)
36 print '.' 36 print '.'
  37 + pc
37 end 38 end
38 39
39 def new_region(name, parent, lat, lng) 40 def new_region(name, parent, lat, lng)
40 path = (parent ? parent.path + '/' : '') + name.to_slug 41 path = (parent ? parent.path + '/' : '') + name.to_slug
41 - Region.find_by_path(path) || Region.create!(:name => name, :parent => parent, :lat => lat, :lng => lng, :environment => Environment.default) 42 + region = Region.find_by_path(path) || Region.create!(:name => name, :parent => parent, :lat => lat, :lng => lng, :environment => Environment.default)
42 print '.' 43 print '.'
  44 + region
43 end 45 end
44 46
45 def new_ent(data, products, consumptions) 47 def new_ent(data, products, consumptions)