If you haven't yet, check out consts_starting_with() in vendor/plugins/aardvark_shared/lib/active_record_extensions.rb. It dynamically collects constants from a class. For example if your constants start ADDED_CONTEXT_* you can collect them all into an array like so:
VALID_ADDED_CONTEXTS = consts_starting_with('ADDED_CONTEXT_')
--
Love,
Fritz
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment