Closed mbajur closed 5 years ago
No more that supports in 2.x.
If your project has used RailsSettings::Extend
, you can continue use rails-setting-cached 0.x.
When you have a new project, you can try 2.x, and use ActiveRecord serialize instead of the RailsSettings::Extend
feature.
@huacnlee Is there an example of how one would replace with RailsSettings::Extend
with ActiveRecord
serialize
? I'd love to use version 2.x but it's unclear how to use this gem in the context of model specific settings. I'd argue that most applications have the requirements for both, global settings and model specific settings. Any help / documentation much appreciated.
There will be no longer have that feature in 2.x.
If you wants upgrade to 2.x, I recommend you to write a migrations to transfer the old model special setting values into Rails serialize field.
To do this it’s not complex, if your application not have too much records. So, you can easy to do that.
@nicbet @mbajur
Here is an example for backward-compatible scoped setting in 2.x
Excellent, thanks for the guidance @huacnlee!
https://github.com/ruby-china/homeland/pull/1113/commits/6dd4dc293cfb7818631e36d9ad41bf83bc4ea4dc
Here is an example for upgrade from 0.x to 2.x
Hey!
I recently updated from 0.x to 2.x and noticed there is no way to have a settings per model (eg. i had a
User
model withinclude RailsSettings::Extend
so i could useUser.last.settings.foo = :bar
.Is that feature deprecated in 2.x ? Are you planning to support that scenario?