3 Commits

Author SHA1 Message Date
Javi Martín
45517f659e Add SDG goals/targets to legislation proposals 2021-02-24 20:42:53 +01:00
Senén Rodero Rodríguez
fb611d91ca Fix legislation proposal crash with SDG enabled
Now we check the given record or name is a relatable instance or class
to avoid trying to render goals for records which don't have a goals
association.

Note for now we are ignoring the case where we pass a controller_path
for an unsupported class (for example, `legislation/proposals` or
`budgets/headings`) because we never use it. We might need to revisit
this case in the future.

Co-Authored-By: Javi Martín <javim@elretirao.net>
2021-01-31 14:44:53 +01:00
Senén Rodero Rodríguez
046e2273c7 Add tests for SDG::ProcessEnabled model
We were testing it through other models, but unit tests help when
changing the code of this class.

Co-Authored-By: Javi Martín <javim@elretirao.net>
2021-01-31 13:56:05 +01:00