Rails 使用 store 能这样建立关系吗?

yaoge · 2013年10月23日 · 最后由 Rei 回复于 2013年10月24日 · 1814 次阅读
class User < ActiveRecord::Base
  store :settings, accessors => [:source_id,:other]
end

这样的资料存储方式可以像下面这样使用 belongs_to 建立关系吗?

class User < ActiveRecord::Base
  store :settings, accessors => [:source_id,:other]

  belongs_to :source

end

store 这个东东会不会搞得页面打开很慢?

楼主应该去试试,然后把结果贴上来。

需要 登录 后方可回复, 如果你还没有账号请 注册新账号