diff options
author | Gareth Rees <gareth@mysociety.org> | 2015-02-05 14:13:51 +0000 |
---|---|---|
committer | Gareth Rees <gareth@mysociety.org> | 2015-02-20 11:59:05 +0000 |
commit | 8648236927ae030452d2ff2e18e6ce37b8c2f955 (patch) | |
tree | f4505a553844c7a4659258397e5461f56f7fc8c4 /app/models/info_request.rb | |
parent | 7886e830d8a20f80ec2516aaab021cc9546d1871 (diff) |
Refactor showing the Make Request button
The code here was hard to follow. Now we have a cleaner path to decide
whether to show the Make Request button or not.
- Always show any notes associated with the body
- If a request can be made to the body
- Show any tag-specific notes that may affect the request
- Show the Make Request button
- If a request cannot be made to the body
- Show the most relevant reason why a request cannot be made
Added PublicBodyHelper#public_body_not_requestable_reasons to extract
the logic of finding the reason a user can’t request out of the template
Diffstat (limited to 'app/models/info_request.rb')
0 files changed, 0 insertions, 0 deletions