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.
the organizations have two setting methods.
root_org_setting
andsetting
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.