README.md in rails-settings-cached-0.2.4 vs README.md in rails-settings-cached-0.3.0
- old
+ new
@@ -23,10 +23,18 @@
```bash
$ rails g settings <settings_name>
```
+Note: If you migrating from gem `rails-settings` then make sure you have it in your model
+
+```ruby
+class Settings < RailsSettings::CachedSettings
+ ...
+end
+```
+
Now just put that migration in the database with:
```bash
rake db:migrate
```
@@ -99,10 +107,10 @@
```
Init defualt value in database, this has indifferent with `Setting.defaults[:some_setting]`, this will **save the value into database**:
```ruby
-Setting.save_default(:some_key) = "123"
+Setting.save_default(:some_key, "123")
Setting.where(:var => "some_key").count
=> 1
Setting.some_key
=> "123"
```