mirror of
https://github.com/Growstuff/growstuff.git
synced 2026-05-19 06:15:44 -04:00
Merge pull request #861 from hcbviolet/descriptions
#852 Harvest description headings rendered when there's no description
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user