Commit fda8b25d19bc6d5fd2b53676bce6bce31d322292
1 parent
01cdf354
Exists in
master
and in
29 other branches
ActionItem261: commenting a helper in development
git-svn-id: https://svn.colivre.coop.br/svn/noosfero/trunk@1682 3f533792-8f58-4932-b0fe-aaf55b0a4547
Showing
1 changed file
with
18 additions
and
18 deletions
Show diff stats
app/helpers/application_helper.rb
| ... | ... | @@ -468,23 +468,23 @@ module ApplicationHelper |
| 468 | 468 | content_tag('div', result) |
| 469 | 469 | end |
| 470 | 470 | |
| 471 | - def select_city(name, top_level='Nacional') | |
| 472 | - city_field_name = "#{object}[#{method}]" | |
| 473 | - state_field_name = "#{object}_#{method}_state" | |
| 474 | - region_field_name = "#{object}_#{method}_region" | |
| 475 | - | |
| 476 | - selected_state = nil | |
| 477 | - selected_region = nil | |
| 478 | - | |
| 479 | - regions = Region.find_by_name(top_level).children | |
| 480 | - | |
| 481 | - select_tag(region_field_name, options_for_select(regions.map {|r| [r.name, r.id] } + ['---','']) + | |
| 482 | - select_tag(state_field_name, options_for_select(['---', ''])) + | |
| 483 | - select_tag(city_fied_name, options_for_select(['---',''])) + | |
| 484 | - | |
| 485 | - observe_field(country_field_name, :update => state_field_name, :url => { :controller => 'geography', :action => 'states' }, :with => 'country' ) + | |
| 486 | - observe_field(country_field_name, :update => city_field_name, :url => { :controller => 'geography', :action => 'cities_by_country' }, :with => 'country') + | |
| 487 | - observe_field(state_field_name, :update => city_field_name, :url => { :controller => 'geography', :action => 'cities' }, :with => 'state_id') | |
| 488 | - end | |
| 471 | +# def select_city(name, top_level='Nacional') | |
| 472 | +# city_field_name = "#{object}[#{method}]" | |
| 473 | +# state_field_name = "#{object}_#{method}_state" | |
| 474 | +# region_field_name = "#{object}_#{method}_region" | |
| 475 | +# | |
| 476 | +# selected_state = nil | |
| 477 | +# selected_region = nil | |
| 478 | +# | |
| 479 | +# regions = Region.find_by_name(top_level).children | |
| 480 | +# | |
| 481 | +# select_tag(region_field_name, options_for_select(regions.map {|r| [r.name, r.id] } + ['---','']) + | |
| 482 | +# select_tag(state_field_name, options_for_select(['---', ''])) + | |
| 483 | +# select_tag(city_fied_name, options_for_select(['---',''])) + | |
| 484 | +# | |
| 485 | +# observe_field(country_field_name, :update => state_field_name, :url => { :controller => 'geography', :action => 'states' }, :with => 'country' ) + | |
| 486 | +# observe_field(country_field_name, :update => city_field_name, :url => { :controller => 'geography', :action => 'cities_by_country' }, :with => 'country') + | |
| 487 | +# observe_field(state_field_name, :update => city_field_name, :url => { :controller => 'geography', :action => 'cities' }, :with => 'state_id') | |
| 488 | +# end | |
| 489 | 489 | |
| 490 | 490 | end | ... | ... |