Use helper argument intead of instance variable.

This commit is contained in:
Senén Rodero Rodríguez
2017-06-26 15:03:49 +02:00
parent 45d907219a
commit 3e976b4f4b

View File

@@ -26,7 +26,7 @@ module InvestmentsHelper
end
def errors_on_image(investment)
@investment.errors[:image].join(', ') if @investment.errors.has_key?(:image)
investment.errors[:image].join(', ') if investment.errors.has_key?(:image)
end
end