nested_form_fields:在Ruby on Rails表单中动态添加和删除嵌套的has_many关联字段

时间:2021-04-22 23:46:11
【文件属性】:
文件名称:nested_form_fields:在Ruby on Rails表单中动态添加和删除嵌套的has_many关联字段
文件大小:60KB
文件格式:ZIP
更新时间:2021-04-22 23:46:11
Ruby 嵌套表单字段 这个Rails gem帮助创建具有嵌套has_many关联的模型的表单。 它使用jQuery动态添加和删除嵌套关联。 适用于任意深度嵌套的关联(经过4个级别的测试)。 可与诸如类的表单构建器。 需要Ruby 1.9+和Rails资产管道。 安装 将此行添加到您的应用程序的Gemfile中: gem 'nested_form_fields' 然后执行: $ bundle 在您的application.js文件中添加: //= require nested_form_fields Rails 5.1+ 当Rails从默认堆栈中删除jQuery时,您将需要安装jQuery。 添加到Gemfile: gem 'jquery-rails' 执行: $ bundle 添加到application.js: //= require jquery3 //= r
【文件预览】:
nested_form_fields-master
----.gitignore(228B)
----README.md(7KB)
----nested_form_fields.gemspec(1KB)
----gemfiles()
--------rails_5.2.gemfile(210B)
--------rails_6.0.gemfile(210B)
----Gemfile(103B)
----LICENSE(1KB)
----Appraisals(352B)
----.rspec(26B)
----spec()
--------integration()
--------dummy()
--------spec_helper.rb(1KB)
----.travis.yml(344B)
----lib()
--------nested_form_fields.rb(6KB)
--------nested_form_fields()
--------assets()
----Rakefile(134B)

网友评论