oasis4hedev / salsa

Web app for creating a syllabus in an accessible HTML document, publishing to the Canvas LMS, and more.
https://syllabustool.com
Other
6 stars 5 forks source link

Refactor the organization settings. #517

Open opsaaaaa opened 5 years ago

opsaaaaa commented 5 years ago

the organizations have two setting methods.

root_org_setting and setting

both of these should cache their results in an instance variable within their organization to make it safe to use in loops.

The setting method needs to be able to handle empty strings as well as nil values.

The setting currently each have their own column. It would be better to store these as a json data type.

I also anticipate needing settings for other objects. like report_archive for example used a used_meta column to record if it was built with document_meta or not. it also has a filters column to record what filters it used.

opsaaaaa commented 4 years ago

also cache organizations setting