Files
grecia/app/models
Javi Martín 413d0ed9be Return the persisted line in add_investment
This method was returning a boolean value and caused a
`Naming/PredicateMethod` when upgrading rubocop.

So, instead, we're returning the created line when it was successfully
created, and `nil` when it wasn't.

Having said that, I'm not sure why we added the `.persisted?` back in
commit 3eb22ab7b since as far as I can tell we don't use the return
value for anything. The test added in commit da43e9e2e for this change
passes if we simply return `lines.create(investment: investment)`.

For now I'm leaving the `persisted?` check just in case, but removing it
might be fine.
2025-11-05 14:27:11 +01:00
..
2024-11-13 15:55:20 +01:00
2021-08-16 16:31:04 +02:00
2021-12-30 15:50:02 +01:00
2023-11-22 14:44:24 +01:00
2021-04-13 13:52:18 +02:00
2024-04-02 16:31:10 +02:00
2025-08-14 13:06:43 +02:00
2020-12-02 12:13:02 +01:00
2021-08-16 16:31:04 +02:00
2021-08-16 16:31:04 +02:00
2019-10-25 19:29:12 +02:00
2024-11-13 15:55:20 +01:00
2021-01-12 14:50:37 +01:00