文件名称:activeadmin-dry-validation:通过干式验证来验证您的ActiveAdmin资源
文件大小:44KB
文件格式:ZIP
更新时间:2024-05-28 09:09:34
ruby rails schema activeadmin Ruby
Activeadmin :: Dry :: Validation 安装 将此行添加到您的应用程序的Gemfile中: gem 'activeadmin-dry-validation' 用法 ActiveAdmin . register SomeResource do permit_params :title , :announcement , :some_attr schema do required ( :announcement ) . filled ( :str? ) required ( :title ) . filled ( :str? ) required ( :some_attr ) . filled ( :str? ) end form do | f | f . semantic_errors ( * f . object
【文件预览】:
activeadmin-dry-validation-master
----LICENSE.txt(1KB)
----lib()
--------activeadmin()
----Gemfile(300B)
----spec()
--------controllers()
--------spec_helper.rb(488B)
--------dummy()
--------rails_helper.rb(1KB)
--------activeadmin()
--------factories()
----Rakefile(114B)
----.travis.yml(147B)
----README.md(2KB)
----.rubocop.yml(1KB)
----activeadmin-dry-validation.gemspec(1KB)
----.rspec(53B)
----.editorconfig(189B)
----.gitignore(249B)
----bin()
--------console(361B)
--------setup(131B)
--------rubocop(403B)