property_sets:在边表中存储属性的方法

时间:2021-05-08 18:29:22
【文件属性】:
文件名称:property_sets:在边表中存储属性的方法
文件大小:29KB
文件格式:ZIP
更新时间:2021-05-08 18:29:22
Ruby 属性集 使用该gem可以使用基本的“键/值”存储区以关系方式存储给定模型的属性,其中每个属性行。 另外,您需要为每个属性的主表添加一个新列,或使用序列化属性及其值。 描述 您可以通过在模型中指定以下属性来配置允许的存储属性: class Account < ActiveRecord xss=removed> "v1.0" property :featured , :protected => true property :activated end property_set :texts do property :epilogue end end 然后可以通过定义的关联在运行时访问声明的属性: # Return the value
【文件预览】:
property_sets-master
----benchmark()
--------read.rb(2KB)
----property_sets.gemspec(867B)
----Rakefile(135B)
----.github()
--------workflows()
--------CODEOWNERS(31B)
----gemfiles()
--------rails4.2.gemfile(178B)
--------rails6.0.gemfile(175B)
--------rails5.2.gemfile(177B)
--------rails5.0.gemfile(178B)
--------common.rb(81B)
--------rails6.1.gemfile(175B)
--------rails5.1.gemfile(177B)
----LICENSE(10KB)
----Gemfile(244B)
----spec()
--------property_sets_spec.rb(16KB)
--------casting_spec.rb(2KB)
--------support()
--------view_extensions_spec.rb(7KB)
--------delegator_spec.rb(2KB)
--------spec_helper.rb(1KB)
----.gitignore(85B)
----lib()
--------property_sets()
--------property_sets.rb(816B)
----README.md(5KB)

网友评论