Closed jfilipe closed 7 years ago
The store definition is shared for all the instances of a class, so no, you can't define them dynamically on an instance basis.
The closest thing I can think of is STI: http://api.rubyonrails.org/classes/ActiveRecord/Inheritance.html
Hey there, First off let me say this is a great library.
I'm curious if you can recommend a way of defining dynamic settings per instance. My use case is to expose a subset of user settings that are defined from a larger pool of predefined team settings.
i.e.
The above works, however because it's changing the global class, all future instances of
UserSetting
are populated with incorrectpreferences
. I've tried playing around withsingleton_class
however I'm curious if there's a better way to go about this.Thanks!