Commit ebe5293ee8867446b7132d765f82e604d8a1d3fc
1 parent
bc7115d5
Exists in
master
and in
28 other branches
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 | 32 | |
33 | 33 | def new_cat(name, parent = nil) |
34 | 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 | 36 | print '.' |
37 | + pc | |
37 | 38 | end |
38 | 39 | |
39 | 40 | def new_region(name, parent, lat, lng) |
40 | 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 | 43 | print '.' |
44 | + region | |
43 | 45 | end |
44 | 46 | |
45 | 47 | def new_ent(data, products, consumptions) | ... | ... |