statify_model

时间:2021-05-03 12:00:58
【文件属性】:
文件名称:statify_model
文件大小:33KB
文件格式:ZIP
更新时间:2021-05-03 12:00:58
Ruby StatifyModel 该项目动摇并使用了MIT-LICENSE。 StatifyModel为具有名为“ enabled”的表列的模型提供范围和帮助器方法。 安装 添加到您的Gemfile 宝石'statify_model' 用法 在您要描述的模型中,定义类型为“ boolean”的“已启用”列。 在模型中调用方法“ has_status”。 例如。 -- class Talk < ActiveRecord :: Base has_status end 在Talk类上定义的范围是- enabled - Filters all the enabled records. returns arel of all the enabled records. disabled - Filters all the disabled records. returns are
【文件预览】:
statify_model-master
----.gitignore(201B)
----README.rdoc(1KB)
----lib()
--------statify_model.rb(99B)
--------statify_model()
--------tasks()
----statify_model.gemspec(919B)
----Gemfile(569B)
----MIT-LICENSE(1KB)
----Rakefile(580B)
----test()
--------dummy()
--------statify_model_test.rb(140B)
--------has_status_test.rb(0B)
--------test_helper.rb(811B)
----Gemfile.lock(3KB)

网友评论