draper_simple_form:将 Draper 装饰器应用于 SimpleForms

时间:2021-06-19 17:43:41
【文件属性】:
文件名称:draper_simple_form:将 Draper 装饰器应用于 SimpleForms
文件大小:5KB
文件格式:ZIP
更新时间:2021-06-19 17:43:41
Ruby DraperSimpleForm 当为获取关联输入时,它不应用来自装饰器,这解决了这个问题。 安装 将此行添加到应用程序的 Gemfile 中: gem 'draper_simple_form', require: "draper/simple_form" 然后执行: $ bundle 用法 现在,无论何时: <%= simple_form_for @user do |f| %> <%= f.association :personas %> <%= f.button :submit %> <% end %> 关联对象应该被修饰 贡献 分叉吧 创建您的功能分支( git checkout -b my-new-feature ) 提交您的更改( git commit -am 'Add some feature' ) 推送到分支( git push origin my
【文件预览】:
draper_simple_form-master
----Rakefile(28B)
----draper_simple_form.gemspec(962B)
----Gemfile(103B)
----.gitignore(154B)
----lib()
--------draper_simple_form.rb(66B)
--------draper()
--------draper_simple_form()
----README.md(810B)
----LICENSE.txt(1KB)

网友评论