mirror of
https://github.com/Growstuff/growstuff.git
synced 2026-05-11 01:05:01 -04:00
lint
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user