ApplicationHelper#format_price and Budget#formatted_amount has the same
objective and code, but the Budget#formatted_amount method also uses the
currency of the Budget to correctly give currencies format.
By replacing usage of format_price with formatted_amount we can remove
format_price and have a single location for currency format logic.
Why:
The logic to construct the link to a heading (if it exists) is in three
different places, this is a clear candidate for a helper method.
How:
Just checking at the helper method if `assigned_heading` and `budget`
has values and composing the link if so.
Why:
When there is not Budget accepting (Investment creation) the guide page
doesn't have much sense as it will give the user an option that can't be
used (creating an Investment).
How:
Using `Budget.current&.accepting?` conditional at GuidesHelper to link
to new proposal link instead of guide page, and adding an scenario to
guides feature spec for it.
Why:
Newsletter attribute `segment_recipient` is an integer to be used as
enum. There's no advantage to store a number instead of an string if the
ammount of elements in the table is not going to be huge, or we can take
advantage of using an enum.
Also maintaining both Newsletters enum paired with UserSegments::SEGMENTS
would be a maintenance burden.
How:
* Migration to change segment_recipient column from integer to string
* Removing enumeration from Newsletter model class
* Using UserSegments::SEGMENTS instead of Newsletter.segment_recipients
or integer values
During a Participatory Budget, some users are getting confused and
creating a proposal instead of a budget investment. This intermediate
page should help them create investments
Adding a feature flag just in case other forks don’t need this feature
and setting seeds and dev_seeds for appropriate initial setup