attributes Blogs
Written by Kiprosh, team of passionate and disciplined craftsmen turning your ideas into reality.
Kiprosh is now part of LawLytics
Written by Kiprosh, team of passionate and disciplined craftsmen turning your ideas into reality.
What is ActiveRecord::Store? Store provides a simple means of accessing and storing key/value pairs related to a model. Store gives you a thin wrapper around serialize for the purpose of storing hashes in a single column. In simple words, it is used for storing mutiple columns under a single column. Its serailized/deserialized to save and load the data for easy access. Example You have a Music application, you want to cache the last volume adjustment for the user. So that when he returns back, same volume level is applied, similarly other volume related settings. Now you can
This is an awesome link on how to setup attributes on ActiveRecord LINK: 5-ways to set attributes And I want to mention one trick about active record: When we try to assign a value to active record object like class A In case of any queries, post your queries in comments.