This pull request is the first step on NZSL-51, moving code that relies on data from Freelex into a module. This includes the signs controller and related services (primarily related to search).
This PR also adds a model named SignModel, with a class method to resolve the correct model class. This class is used outside the Freelex module namespace to resolve the correct model class to use - e.g. when querying for random signs, sign of the day, or for looking up signs by ID. At the moment, this class always returns Freelex::Sign. The next PR will start adding support for Signbank::Sign.
The objective of this change is to enable support for feature flagging the source for dictionary data. This allows us to switch between Freelex and Signbank while testing, to ensure data equivalency and to be able to test dictionary export changes. This change is going to stay in place until at least February, at which point we'll be able to remove the Freelex-based code, and replace SignModel.resolve with direct calls to Signbank::Sign.
This pull request is the first step on NZSL-51, moving code that relies on data from Freelex into a module. This includes the signs controller and related services (primarily related to search).
This PR also adds a model named
SignModel
, with a class method toresolve
the correct model class. This class is used outside theFreelex
module namespace to resolve the correct model class to use - e.g. when querying for random signs, sign of the day, or for looking up signs by ID. At the moment, this class always returnsFreelex::Sign
. The next PR will start adding support forSignbank::Sign
.The objective of this change is to enable support for feature flagging the source for dictionary data. This allows us to switch between Freelex and Signbank while testing, to ensure data equivalency and to be able to test dictionary export changes. This change is going to stay in place until at least February, at which point we'll be able to remove the Freelex-based code, and replace
SignModel.resolve
with direct calls toSignbank::Sign
.