Skip to content

Commit

Permalink
feat: remove unwanted function
Browse files Browse the repository at this point in the history
  • Loading branch information
yuelongh committed Jan 9, 2024
1 parent b88b722 commit 76040fa
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 11 deletions.
10 changes: 0 additions & 10 deletions app/controllers/country_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@ def show
def build_stats
@tabs = [{ id: 'wdpa', title: I18n.t('global.area-types.wdpa') }]
@stats_data = build_hash(:wdpa)
@number_of_national_desinitions = get_number_of_national_desinitions

if has_oecms
@stats_data.merge!(build_oecm_hash)
Expand All @@ -66,15 +65,6 @@ def protected_areas

private

def get_number_of_national_desinitions
number_of_national_desinitions = 0
designations_list = @stats_data[:wdpa][:designations][:designations]
designations_list.each do |designation|
total = designation[:total]
number_of_national_desinitions = total if designation[:type] == 'National' && total.is_a?(Integer)
end
number_of_national_desinitions
end

def has_oecms
@total_oecm = @country.protected_areas.oecms.count
Expand Down
1 change: 0 additions & 1 deletion app/views/country/show.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
total_oecm: @total_oecm,
total_pame: @total_pame,
total_wdpa: @total_wdpa,
number_of_national_desinitions: @number_of_national_desinitions,
wdpa_national_designations_count: @wdpa_national_designations_count,
oecm_national_designations_count: @oecm_national_designations_count
} %>
Expand Down

0 comments on commit 76040fa

Please sign in to comment.