Merge pull request #861 from hcbviolet/descriptions

#852 Harvest description headings rendered when there's no description
This commit is contained in:
Cesy
2016-04-09 13:08:00 +01:00

View File

@@ -38,8 +38,8 @@ module HarvestsHelper
end
def display_harvest_description(harvest)
if harvest.description.nil?
"no description provided."
if harvest.description.empty?
"No description provided."
else
truncate(harvest.description, length: 130, separator: ' ', omission: '... ') { link_to "Read more", harvest_path(harvest) }
end