This commit is contained in:
Brenda Wallace committed 2019-04-20 15:10:08 +12:00
1 parent 33460bb171
commit f86177e78f
3 files changed
+5 -5

No files matched your search

+1 -1
View File
@@ -11,7 +11,7 @@ module HarvestsHelper
end
def display_human_quantity(harvest)
return unless harvest.quantity.present? && harvest.quantity > 0
return unless harvest.quantity.present? && harvest.quantity > 0
if harvest.unit == 'individual' # just the number
number_to_human(harvest.quantity, strip_insignificant_zeros: true)
+3 -3
View File
@@ -9,9 +9,9 @@ module SeedsHelper
def display_seed_description(seed)
if seed.description.present?
truncate(seed.description, length: 130, separator: ' ', omission: '... ') { link_to "Read more", seed_path(seed) }
else
''
return truncate(seed.description, length: 130, separator: ' ', omission: '... ') { link_to "Read more", seed_path(seed) }
end
''
end
end
+1 -1
View File
@@ -86,7 +86,7 @@ describe "plantings/show" do
end
it "shows the member's location in parentheses" do
expect(rendered).to have_content "#{planting.owner.location}"
expect(rendered).to have_content planting.owner.location.to_s
end
end
end