分享 rails edge 可以让你在一个 column 存 Hash,ActiveRecord::Store

xds2000 · December 31, 2011 · Last by huacnlee replied at February 04, 2012 · 2514 hits

Store gives you a thin wrapper around serialize for the purpose of storing hashes in a single column. It's like a simple key/value store backed into your record when you don't care about being able to query that store outside the context of a single record.

http://edgeapi.rubyonrails.org/classes/ActiveRecord/Store.html

数据存放看起来是通过序列号成字符串存储的

You need to Sign in before reply, if you don't have an account, please Sign up first.