Skip to content
This repository has been archived by the owner on Nov 6, 2021. It is now read-only.

Commit

Permalink
#156 Added "Not Provided" for fields with missing information. (#158)
Browse files Browse the repository at this point in the history
* #156 Added "Not Provided" for fields with missing information.

* Use instance variable so that 'Not Provided' is defined only once, to prevent misspelling and simplify modification.

* Use Rails internationalization for string "Not Provided".

* Removed @not_provided variable assignment no longer needed.
  • Loading branch information
keithrbennett authored and benreyn committed Jul 30, 2019
1 parent 4d7584e commit 6e94892
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 13 deletions.
26 changes: 13 additions & 13 deletions app/views/partners/show.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -207,48 +207,48 @@

<h6>Ethnic Composition of Those Served</h6>
<dt>African American</dt>
<dd><%= @partner.population_black %></dd>
<dd><%= @partner.population_black || t(:not_provided) %></dd>

<dt>Caucasian</dt>
<dd><%= @partner.population_white %></dd>
<dd><%= @partner.population_white || t(:not_provided) %></dd>

<dt>Hispanic</dt>
<dd><%= @partner.population_hispanic %></dd>
<dd><%= @partner.population_hispanic || t(:not_provided) %></dd>

<dt>Asian</dt>
<dd><%= @partner.population_asian %></dd>
<dd><%= @partner.population_asian || t(:not_provided) %></dd>

<dt>American Indian</dt>
<dd><%= @partner.population_american_indian %></dd>
<dd><%= @partner.population_american_indian || t(:not_provided) %></dd>

<dt>Pacific Islander</dt>
<dd><%= @partner.population_island %></dd>
<dd><%= @partner.population_island || t(:not_provided) %></dd>

<dt>Multi-racial</dt>
<dd><%= @partner.population_multi_racial %></dd>
<dd><%= @partner.population_multi_racial || t(:not_provided) %></dd>

<dt>Other</dt>
<dd><%= @partner.population_other %></dd>
<dd><%= @partner.population_other || t(:not_provided) %></dd>

<dt>Zip Codes Served</dt>
<dd><%= @partner.zips_served %></dd>

<h6>Poverty Information of Those Served</h6>
<dt>At FPL or below</dt>
<dd><%= @partner.at_fpl_or_below %></dd>
<dd><%= @partner.at_fpl_or_below || t(:not_provided) %></dd>

<dt>Above 1-2 times FPL</dt>
<dd><%= @partner.above_1_2_times_fpl %></dd>
<dd><%= @partner.above_1_2_times_fpl || t(:not_provided) %></dd>

<dt>Greater than 2 times FPL</dt>
<dd><%= @partner.greater_2_times_fpl %></dd>
<dd><%= @partner.greater_2_times_fpl || t(:not_provided) %></dd>

<dt>Poverty Unknown</dt>
<dd><%= @partner.poverty_unknown %></dd>
<dd><%= @partner.poverty_unknown || t(:not_provided) %></dd>

<h6>Ages Served</h6>
<dt>Ages</dt>
<dd><%= @partner.ages_served %></dd>
<dd><%= @partner.ages_served || t(:not_provided) %></dd>
</dl>
</div>
</div>
Expand Down
1 change: 1 addition & 0 deletions config/locales/en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
# available at http://guides.rubyonrails.org/i18n.html.

en:
not_provided: "Not Provided"
hello: "Hello world"
:true: 'Yes'
:false: 'No'

0 comments on commit 6e94892

Please sign in to comment.