This website works better with JavaScript.
Explore
Help
Sign In
baarkerlounger
/
submit-social-housing-lettings-and-sales-data
mirror of
https://github.com/communitiesuk/submit-social-housing-lettings-and-sales-data.git
Watch
1
Star
0
Fork
You've already forked submit-social-housing-lettings-and-sales-data
0
Code
Issues
Projects
Releases
Wiki
Activity
Submit social housing lettings and sales data (CORE)
core
1965
Commits
224
Branches
265
Tags
67 MiB
Tree:
c84bddd8fd
submit-social-housing-letti...
/
app
/
models
/
la_rent_range.rb
4 lines
57 B
Raw
Normal View
History
Unescape
Escape
Cldc 491 rent and charges validations (#411) * Add rent ranges table and basic hard range validation Co-authored-by: baarkerlounger <baarkerlounger@users.noreply.github.com> * Add import rent ranges rake task Co-authored-by: baarkerlounger <baarkerlounger@users.noreply.github.com> * Update the rent range validation to validate all related fields and check for the correct collection year * Add ranges data * add error messages * Add readme step * extract get collection year method * rename method * create instead of find and create laRentRange record Co-authored-by: baarkerlounger <baarkerlounger@users.noreply.github.com>
3 years ago
class
LaRentRange
<
ApplicationRecord
Cldc 1675 rent validations (#959) * feat: add 2022 rent range data, update rake task for population of this * feat: change file format so ranges_rent_id is recognised * feat: add updated error messages and casing * tests: make tests pass * feat: ensure there is a location_code in all locations and use this (and beds = 0) for supported housing rent validations * feat: fix general needs validation behaviour * feat: add local authorities enum to location.rb * feat: ensure case when beds > 4 is accounted for * feat: add error messages on property postcode page as well as la page * feat: add error messages on scheme_id and location_id as well as la page * feat: add error messages on scheme_id and location_id as well as la page * feat: null coalescing and validations on changing las to one that invalidates rent in supported housing * feat: nil protection * refactor: linting * refactor: combining duplicated logic * tests: add hard validation tests split by needstype * feat: update validations when beds > 4 * feat: update validations when beds > 4 * refactor: simplification, use preivous la method * refactor: response to PR comments, fixing beds.negative validation * feat: remove dynamic local auth name text from interruption screens - to be added back in later if this becomes a priority, would need some work on adding local auth name to log for supported housing logs not just leaving it in the location
2 years ago
MAX_BEDS
=
4
Cldc 491 rent and charges validations (#411) * Add rent ranges table and basic hard range validation Co-authored-by: baarkerlounger <baarkerlounger@users.noreply.github.com> * Add import rent ranges rake task Co-authored-by: baarkerlounger <baarkerlounger@users.noreply.github.com> * Update the rent range validation to validate all related fields and check for the correct collection year * Add ranges data * add error messages * Add readme step * extract get collection year method * rename method * create instead of find and create laRentRange record Co-authored-by: baarkerlounger <baarkerlounger@users.noreply.github.com>
3 years ago
end