【问题标题】:How do I get nested_form to work with Formtastic in Rails 3.1?如何让 nested_form 在 Rails 3.1 中使用 Formtastic?
【发布时间】:2011-12-12 04:43:18
【问题描述】:

我在 Formtastic 上有以下表格:

= semantic_form_for @user, :url=> url_for(register_path), :html => {:id => "registration_form"} do |f| 

  = f.inputs :name => "Addresses", :id=> "addresses" do
    = f.fields_for :addresses do |a|
      %li.address
        %ol
          = a.input :street
          = a.link_to_remove "Remove address"
    #add_address
      = f.link_to_add "New Address", :addresses

我收到以下错误:

用于#的未定义方法`link_to_remove'

我使用semantic_fields_for 还是只使用fields_for 都没关系

另外,我使用的是 github 上的内容(据说修复了这个问题),而不是发布的 gem:

gem "nested_form", :git => "git://github.com/ryanb/nested_form.git"

任何帮助将不胜感激,我在这里拉头发:/

谢谢!

堆栈跟踪

app/views/shared/_address_fields.html.haml:9:in `_app_views_shared__address_fields_html_haml___4308950470074423288_2167792580' actionpack (3.1.1) lib/action_view/template.rb:144:in `block in render' activesupport (3.1.1) lib/active_support/notifications.rb:55:in `instrument' actionpack (3.1.1) lib/action_view/template.rb:142:in `render' actionpack (3.1.1) lib/action_view/renderer/partial_renderer.rb:256:in `render_partial' actionpack (3.1.1) lib/action_view/renderer/partial_renderer.rb:228:in `block (2 levels) in render' actionpack (3.1.1) lib/action_view/renderer/abstract_renderer.rb:33:in `block in instrument' activesupport (3.1.1) lib/active_support/notifications.rb:53:in `block in instrument' activesupport (3.1.1) lib/active_support/notifications/instrument.rb:21:in `instrument' activesupport (3.1.1) lib/active_support/notifications.rb:53:in `instrument' actionpack (3.1.1) lib/action_view/renderer/abstract_renderer.rb:33:in `instrument' actionpack (3.1.1) lib/action_view/renderer/partial_renderer.rb:227:in `block in render' actionpack (3.1.1) lib/action_view/renderer/abstract_renderer.rb:22:in `wrap_formats' actionpack (3.1.1) lib/action_view/renderer/partial_renderer.rb:219:in `render' actionpack (3.1.1) lib/action_view/renderer/renderer.rb:41:in `render_partial' actionpack (3.1.1) lib/action_view/renderer/renderer.rb:15:in `render' actionpack (3.1.1) lib/action_view/helpers/rendering_helper.rb:24:in `render' haml (3.1.4) lib/haml/helpers/action_view_mods.rb:11:in `block in render_with_haml' haml (3.1.4) lib/haml/helpers.rb:90:in `non_haml' haml (3.1.4) lib/haml/helpers/action_view_mods.rb:11:in `render_with_haml' app/views/user/registrations/new.html.haml:17:in `block (3 levels) in _app_views_user_registrations_new_html_haml___2562073157518560036_2193979060' haml (3.1.4) lib/haml/helpers/action_view_mods.rb:93:in `block in capture_with_haml' haml (3.1.4) lib/haml/helpers.rb:345:in `call' haml (3.1.4) lib/haml/helpers.rb:345:in `block in capture_haml' haml (3.1.4) lib/haml/helpers.rb:569:in `with_haml_buffer' haml (3.1.4) lib/haml/helpers.rb:341:in `capture_haml' haml (3.1.4) lib/haml/helpers/xss_mods.rb:61:in `capture_haml_with_haml_xss' haml (3.1.4) lib/haml/helpers/action_view_mods.rb:93:in `capture_with_haml' actionpack (3.1.1) lib/action_view/helpers/form_helper.rb:590:in `fields_for' actionpack (3.1.1) lib/action_view/helpers/form_helper.rb:1393:in `fields_for_nested_model' actionpack (3.1.1) lib/action_view/helpers/form_helper.rb:1379:in `block in fields_for_with_nested_attributes' activerecord (3.1.1) lib/active_record/associations/collection_proxy.rb:91:in `each' activerecord (3.1.1) lib/active_record/associations/collection_proxy.rb:91:in `method_missing' actionpack (3.1.1) lib/action_view/helpers/form_helper.rb:1378:in `fields_for_with_nested_attributes' actionpack (3.1.1) lib/action_view/helpers/form_helper.rb:1261:in `fields_for' formtastic (2.0.2) lib/formtastic/form_builder.rb:79:in `semantic_fields_for' app/views/user/registrations/new.html.haml:16:in `block (2 levels) in _app_views_user_registrations_new_html_haml___2562073157518560036_2193979060' haml (3.1.4) lib/haml/helpers.rb:345:in `call' haml (3.1.4) lib/haml/helpers.rb:345:in `block in capture_haml' haml (3.1.4) lib/haml/helpers.rb:569:in `with_haml_buffer' haml (3.1.4) lib/haml/helpers.rb:341:in `capture_haml' haml (3.1.4) lib/haml/helpers/xss_mods.rb:61:in `capture_haml_with_haml_xss' formtastic (2.0.2) lib/formtastic/helpers/fieldset_wrapper.rb:34:in `field_set_and_list_wrapping' formtastic (2.0.2) lib/formtastic/helpers/inputs_helper.rb:292:in `inputs' app/views/user/registrations/new.html.haml:15:in `block in _app_views_user_registrations_new_html_haml___2562073157518560036_2193979060' haml (3.1.4) lib/haml/helpers/action_view_mods.rb:181:in `call' haml (3.1.4) lib/haml/helpers/action_view_mods.rb:181:in `block (2 levels) in form_for_with_haml' haml (3.1.4) lib/haml/helpers.rb:255:in `with_tabs' haml (3.1.4) lib/haml/helpers/action_view_mods.rb:181:in `block in form_for_with_haml' actionpack (3.1.1) lib/action_view/helpers/capture_helper.rb:40:in `block in capture' actionpack (3.1.1) lib/action_view/helpers/capture_helper.rb:187:in `with_output_buffer' haml (3.1.4) lib/haml/helpers/xss_mods.rb:109:in `with_output_buffer_with_haml_xss' actionpack (3.1.1) lib/action_view/helpers/capture_helper.rb:40:in `capture' haml (3.1.4) lib/haml/helpers/action_view_mods.rb:105:in `capture_with_haml' actionpack (3.1.1) lib/action_view/helpers/form_helper.rb:590:in `fields_for' actionpack (3.1.1) lib/action_view/helpers/form_helper.rb:373:in `form_for' haml (3.1.4) lib/haml/helpers/action_view_mods.rb:183:in `form_for_with_haml' haml (3.1.4) lib/haml/helpers/xss_mods.rb:132:in `form_for_with_haml_xss' formtastic (2.0.2) lib/formtastic/helpers/form_helper.rb:161:in `block in semantic_form_for' formtastic (2.0.2) lib/formtastic/helpers/form_helper.rb:192:in `with_custom_field_error_proc' formtastic (2.0.2) lib/formtastic/helpers/form_helper.rb:160:in `semantic_form_for' app/views/user/registrations/new.html.haml:6:in `_app_views_user_registrations_new_html_haml___2562073157518560036_2193979060' actionpack (3.1.1) lib/action_view/template.rb:144:in `block in render' activesupport (3.1.1) lib/active_support/notifications.rb:55:in `instrument' actionpack (3.1.1) lib/action_view/template.rb:142:in `render' actionpack (3.1.1) lib/action_view/renderer/template_renderer.rb:40:in `block (2 levels) in render_template' actionpack (3.1.1) lib/action_view/renderer/abstract_renderer.rb:33:in `block in instrument' activesupport (3.1.1) lib/active_support/notifications.rb:53:in `block in instrument' activesupport (3.1.1) lib/active_support/notifications/instrument.rb:21:in `instrument' activesupport (3.1.1) lib/active_support/notifications.rb:53:in `instrument' actionpack (3.1.1) lib/action_view/renderer/abstract_renderer.rb:33:in `instrument' actionpack (3.1.1) lib/action_view/renderer/template_renderer.rb:39:in `block in render_template' actionpack (3.1.1) lib/action_view/renderer/template_renderer.rb:47:in `render_with_layout' actionpack (3.1.1) lib/action_view/renderer/template_renderer.rb:38:in `render_template' actionpack (3.1.1) lib/action_view/renderer/template_renderer.rb:12:in `block in render' actionpack (3.1.1) lib/action_view/renderer/abstract_renderer.rb:22:in `wrap_formats' actionpack (3.1.1) lib/action_view/renderer/template_renderer.rb:9:in `render' actionpack (3.1.1) lib/action_view/renderer/renderer.rb:36:in `render_template' actionpack (3.1.1) lib/action_view/renderer/renderer.rb:17:in `render' actionpack (3.1.1) lib/abstract_controller/rendering.rb:120:in `_render_template' actionpack (3.1.1) lib/action_controller/metal/streaming.rb:250:in `_render_template' actionpack (3.1.1) lib/abstract_controller/rendering.rb:114:in `render_to_body' actionpack (3.1.1) lib/action_controller/metal/renderers.rb:30:in `render_to_body' actionpack (3.1.1) lib/action_controller/metal/compatibility.rb:43:in `render_to_body' actionpack (3.1.1) lib/abstract_controller/rendering.rb:99:in `render' actionpack (3.1.1) lib/action_controller/metal/rendering.rb:16:in `render' actionpack (3.1.1) lib/action_controller/metal/instrumentation.rb:40:in `block (2 levels) in render' activesupport (3.1.1) lib/active_support/core_ext/benchmark.rb:5:in `block in ms' /Users/chance/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/1.9.1/benchmark.rb:309:in `realtime' activesupport (3.1.1) lib/active_support/core_ext/benchmark.rb:5:in `ms' actionpack (3.1.1) lib/action_controller/metal/instrumentation.rb:40:in `block in render' actionpack (3.1.1) lib/action_controller/metal/instrumentation.rb:78:in `cleanup_view_runtime' activerecord (3.1.1) lib/active_record/railties/controller_runtime.rb:24:in `cleanup_view_runtime' actionpack (3.1.1) lib/action_controller/metal/instrumentation.rb:39:in `render' 设计(1.5.2)lib/devise/controllers/scoped_views.rb:28:in `render_with_scope' 设计(1.5.2)app/controllers/devise/registrations_controller.rb:9:in `block in new' actionpack (3.1.1) lib/action_controller/metal/responder.rb:231:in `call' actionpack (3.1.1) lib/action_controller/metal/responder.rb:231:in `default_render' actionpack (3.1.1) lib/action_controller/metal/responder.rb:160:in `to_html' actionpack (3.1.1) lib/action_controller/metal/responder.rb:153:in `respond' actionpack (3.1.1) lib/action_controller/metal/responder.rb:146:in `call' actionpack (3.1.1) lib/action_controller/metal/mime_responds.rb:238:in `respond_with' 设计(1.5.2)lib/devise/controllers/internal_helpers.rb:148:in `respond_with_navigational' 设计(1.5.2)app/controllers/devise/registrations_controller.rb:9:in `new' app/controllers/user/registrations_controller.rb:3:in `new' actionpack (3.1.1) lib/action_controller/metal/implicit_render.rb:4:in `send_action' actionpack (3.1.1) lib/abstract_controller/base.rb:167:in `process_action' actionpack (3.1.1) lib/action_controller/metal/rendering.rb:10:in `process_action' actionpack (3.1.1) lib/abstract_controller/callbacks.rb:18:in `block in process_action' activesupport (3.1.1) lib/active_support/callbacks.rb:434:in `_run__1640754455416320338__process_action__2506477701008906327__callbacks' activesupport (3.1.1) lib/active_support/callbacks.rb:386:in `_run_process_action_callbacks' activesupport (3.1.1) lib/active_support/callbacks.rb:81:in `run_callbacks' actionpack (3.1.1) lib/abstract_controller/callbacks.rb:17:in `process_action' actionpack (3.1.1) lib/action_controller/metal/rescue.rb:17:in `process_action' actionpack (3.1.1) lib/action_controller/metal/instrumentation.rb:30:in `block in process_action' activesupport (3.1.1) lib/active_support/notifications.rb:53:in `block in instrument' activesupport (3.1.1) lib/active_support/notifications/instrument.rb:21:in `instrument' activesupport (3.1.1) lib/active_support/notifications.rb:53:in `instrument' actionpack (3.1.1) lib/action_controller/metal/instrumentation.rb:29:in `process_action' actionpack (3.1.1) lib/action_controller/metal/params_wrapper.rb:201:in `process_action' activerecord (3.1.1) lib/active_record/railties/controller_runtime.rb:18:in `process_action' actionpack (3.1.1) lib/abstract_controller/base.rb:121:in `process' actionpack (3.1.1) lib/abstract_controller/rendering.rb:45:in `process' actionpack (3.1.1) lib/action_controller/metal.rb:193:in `dispatch' actionpack (3.1.1) lib/action_controller/metal/rack_delegation.rb:14:in `dispatch' actionpack (3.1.1) lib/action_controller/metal.rb:236:in `block in action' actionpack (3.1.1) lib/action_dispatch/routing/route_set.rb:65:in `call' actionpack (3.1.1) lib/action_dispatch/routing/route_set.rb:65:in `dispatch' actionpack (3.1.1) lib/action_dispatch/routing/route_set.rb:29:in `call' actionpack (3.1.1) lib/action_dispatch/routing/mapper.rb:41:in `call' 机架安装 (0.8.3) lib/rack/mount/route_set.rb:152:in `block in call' 机架安装 (0.8.3) lib/rack/mount/code_generation.rb:96:in `block in identify' 机架安装 (0.8.3) lib/rack/mount/code_generation.rb:75:in `optimized_each' 机架安装 (0.8.3) lib/rack/mount/code_generation.rb:95:in `recognize' 机架安装 (0.8.3) lib/rack/mount/route_set.rb:141:in `call' actionpack (3.1.1) lib/action_dispatch/routing/route_set.rb:532:in `call' 典狱长 (1.1.0) lib/warden/manager.rb:35:in `block in call' 典狱长 (1.1.0) lib/warden/manager.rb:34:in `catch' 典狱长 (1.1.0) lib/warden/manager.rb:34:in `call' actionpack (3.1.1) lib/action_dispatch/middleware/best_standards_support.rb:17:in `call' 机架 (1.3.3) lib/rack/etag.rb:23:in `call' rack (1.3.3) lib/rack/conditionalget.rb:25:in `call' actionpack (3.1.1) lib/action_dispatch/middleware/head.rb:14:in `call' actionpack (3.1.1) lib/action_dispatch/middleware/params_parser.rb:21:in `call' actionpack (3.1.1) lib/action_dispatch/middleware/flash.rb:243:in `call' rack (1.3.3) lib/rack/session/abstract/id.rb:195:in `context' rack (1.3.3) lib/rack/session/abstract/id.rb:190:in `call' actionpack (3.1.1) lib/action_dispatch/middleware/cookies.rb:331:in `call' activerecord (3.1.1) lib/active_record/query_cache.rb:62:in `call' activerecord (3.1.1) lib/active_record/connection_adapters/abstract/connection_pool.rb:477:in `call' actionpack (3.1.1) lib/action_dispatch/middleware/callbacks.rb:29:in `block in call' activesupport (3.1.1) lib/active_support/callbacks.rb:392:in `_run_call_callbacks' activesupport (3.1.1) lib/active_support/callbacks.rb:81:in `run_callbacks' actionpack (3.1.1) lib/action_dispatch/middleware/callbacks.rb:28:in `call' actionpack (3.1.1) lib/action_dispatch/middleware/reloader.rb:68:in `call' rack (1.3.3) lib/rack/sendfile.rb:101:in `call' actionpack (3.1.1) lib/action_dispatch/middleware/remote_ip.rb:48:in `call' actionpack (3.1.1) lib/action_dispatch/middleware/show_exceptions.rb:47:in `call' railties (3.1.1) lib/rails/rack/logger.rb:13:in `call' rack (1.3.3) lib/rack/methodoverride.rb:24:in `call' rack (1.3.3) lib/rack/runtime.rb:17:in `call' rack (1.3.3) lib/rack/lock.rb:15:in `call' actionpack (3.1.1) lib/action_dispatch/middleware/static.rb:53:in `call' railties (3.1.1) lib/rails/engine.rb:456:in `call' railties (3.1.1) lib/rails/rack/content_length.rb:16:in `call' railties (3.1.1) lib/rails/rack/log_tailer.rb:14:in `call' 机架 (1.3.3) lib/rack/handler/webrick.rb:59:in `service'

Gemfile.lock

胃肠道 远程:git://github.com/haines/nested_form.git 修订:a0f78ca877a10055f10bd7d9db972432c6be90ae 眼镜: 嵌套形式(0.1.1) 宝石 远程:http://rubygems.org/ 眼镜: actionmailer (3.1.1) 动作包(= 3.1.1) 邮件 (~> 2.3.0) 动作包 (3.1.1) 活动模型(= 3.1.1) 主动支持 (= 3.1.1) 建造者 (~> 3.0.0) 厄鲁比斯 (~> 2.7.0) i18n (~> 0.6) 机架 (~> 1.3.2) 机架缓存 (~> 1.1) 机架式 (~> 0.8.2) 机架测试(~> 0.6.1) 链轮 (~> 2.0.2) 活动模型(3.1.1) 主动支持 (= 3.1.1) 建造者 (~> 3.0.0) i18n (~> 0.6) 活动记录(3.1.1) 活动模型(= 3.1.1) 主动支持 (= 3.1.1) 雷尔 (~> 2.2.1) tzinfo (~> 0.3.29) 活动资​​源(3.1.1) 活动模型(= 3.1.1) 主动支持 (= 3.1.1) 主动支持 (3.1.1) multi_json (~> 1.0) 可寻址 (2.2.6) 雷尔 (2.2.1) bcrypt-ruby (3.0.1) 建设者(3.0.0) 康康 (1.6.7) 坎探戈 (0.9.4.7) 康康 (>= 1.4) 哈希 (>= 0.4) 导轨 (>= 3.0.1) 高糖(>= 0.6.0) sweetloader (~> 0.1.0) 水豚 (1.1.2) 哑剧类型 (>= 1.16) nokogiri (>= 1.3.3) 机架 (>= 1.0.0) 机架测试 (>= 0.5.4) selenium-webdriver (~> 2.0) xpath (~> 0.1.4) 子进程(0.2.3) 菲(〜> 1.0.6) 可卡因 (0.2.0) 咖啡轨 (3.1.1) 咖啡脚本 (>= 2.2.0) railties (~> 3.1.0) 咖啡脚本(2.2.0) 咖啡脚本源 执行 咖啡脚本源 (1.1.3) 黄瓜 (1.1.4) 建造者 (>= 2.1.2) diff-lcs (>= 1.1.2) 小黄瓜 (~> 2.7.1) json (>= 1.4.6) 术语 ansicolor (>= 1.0.6) 黄瓜导轨 (1.2.1) 水豚 (>= 1.1.2) 黄瓜 (>= 1.1.3) nokogiri (>= 1.5.0) database_cleaner (0.7.0) 设计(1.5.2) bcrypt-ruby (~> 3.0) orm_adapter (~> 0.0.3) 典狱长 (~> 1.1) diff-lcs (1.1.3) em-websocket (0.3.5) 可寻址 (>= 2.1.1) 事件机(>= 0.12.9) 厄鲁比斯 (2.7.0) 事件机(0.12.10) 执行js (1.2.12) multi_json (~> 1.0) factory_girl (2.3.2) 积极支持 factory_girl_rails (1.4.0) factory_girl (~> 2.3.0) 轨道(> = 3.0.0) 菲(1.0.11) 形式化(2.0.2) 导轨 (~> 3.0) friendly_id (4.0.0.beta14) 前端助手(0.1.1) 铁轨 导轨 (~> 3.1.0) sass-rails 链轮 地理编码器(1.1.0) 地名 (0.2.2) 小黄瓜 (2.7.1) json (>= 1.4.6) 咆哮(1.0.3) 后卫(0.8.8) 雷神 (~> 0.14.6) 保护捆绑器(0.1.3) 捆绑器(> = 1.0.0) 后卫(> = 0.2.2) 卫黄瓜 (0.7.4) 黄瓜 (>= 0.10) 后卫(> = 0.8.3) 守卫-livereload (0.3.1) em-websocket (>= 0.2.0) 守卫(> = 0.4.0) multi_json (~> 1.0.3) 护栏 (0.0.3) 后卫(> = 0.2.2) 后卫-rspec (0.5.9) 后卫(> = 0.8.4) 哈姆 (3.1.4) haml-rails (0.3.4) 动作包 (~> 3.0) 主动支持 (~> 3.0) 哈姆 (~> 3.0) railties (~> 3.0) 哈希(1.2.0) 远足 (1.2.1) i18n (0.6.0) jquery-rails (1.0.19) railties (~> 3.0) 雷神 (~> 0.14) json (1.6.3) 发射 (2.0.5) 可寻址 (~> 2.2.6) 邮件 (2.3.0) i18n (>= 0.4.0) 哑剧类型 (~> 1.16) 树顶 (~> 1.4.8) 哑剧类型 (1.17.2) multi_json (1.0.4) nokogiri (1.5.0) orm_adapter (0.0.5) 回形针 (2.4.5) 活动记录 (>= 2.3.0) 主动支持 (>= 2.3.2) 可卡因 (>= 0.0.2) 哑剧类型 pg (0.12.0) rake 编译器 (~> 0.7) 多角恋 (0.5.0) 活动记录 (~> 3.0) 多语言(0.3.3) 机架 (1.3.3) 机架缓存 (1.1) 机架 (>= 0.4) 机架式 (0.8.3) 机架 (>= 1.0.0) 机架 SSL (1.3.2) 架子 机架测试(0.6.1) 机架 (>= 1.0) 导轨 (3.1.1) actionmailer (= 3.1.1) 动作包(= 3.1.1) 活动记录(= 3.1.1) 活动资​​源(= 3.1.1) 主动支持 (= 3.1.1) 捆绑器 (~> 1.0) 轨道(= 3.1.1) rails-footnotes (3.7.5) 导轨 (>= 3.0.0) 铁路(3.1.1) 动作包(= 3.1.1) 主动支持 (= 3.1.1) 机架 SSL (~> 1.3.2) 耙子 (>= 0.8.7) rdoc (~> 3.4) 雷神 (~> 0.14.6) 耙子 (0.9.2.2) rake 编译器 (0.7.9) 耙 rb-fsevent (0.4.3.1) rdoc (3.11) json (~> 1.4) redis (2.2.2) redis 存储 (1.0.0.1) redis (~> 2.2.1) 休息客户端(1.6.7) 哑剧类型 (>= 1.16) rspec (2.7.0) rspec-core (~> 2.7.0) rspec-expectations (~> 2.7.0) rspec-mocks (~> 2.7.0) rspec 核心 (2.7.1) rspec-expectations (2.7.0) diff-lcs (~> 1.1.2) rspec 模拟 (2.7.0) rspec-rails (2.7.0) 动作包 (~> 3.0) 主动支持 (~> 3.0) railties (~> 3.0) rspec (~> 2.7.0) rubyzip (0.9.5) 萨斯(3.1.11) sass-rails (3.1.5) 动作包 (~> 3.1.0) railties (~> 3.1.0) 萨斯(〜> 3.1.10) 倾斜 (~> 1.3.2) 硒网络驱动程序(2.15.0) 子进程 (>= 0.2.1) 菲(〜> 1.0.9) multi_json (~> 1.0.4) rubyzip 链轮 (2.0.3) 远足 (~> 1.2) 机架 (~> 1.0) 倾斜 (!= 1.3.0, ~> 1.1) sqlite3 (1.3.5) 尖叫声 (0.9.3) 活动记录 (~> 3.0) 主动支持 (~> 3.0) 多角(~> 0.5.0) 高糖(0.6.2.1) 主动支持 (>= 3.0.1) 甜蜜装载机(0.1.6) 主动支持 (>= 3.0.1) i18n 术语 ansicolor (1.0.7) 雷神 (0.14.6) 倾斜 (1.3.3) 转运 (1.0.2) json 休息客户端 transloadit-rails (1.0.3) 轨道(〜> 3) 转运 (>= 1.0.2) 树顶 (1.4.10) 多语种 多语言 (>= 0.3.1) tzinfo (0.3.31) 丑陋者(1.1.0) execjs (>= 0.3.0) multi_json (>= 1.0.2) uuidtools (2.1.2) 典狱长 (1.1.0) 机架 (>= 1.0) xpath (0.1.4) nokogiri (~> 1.3) 平台 红宝石 依赖项 可以可以 坎探戈 水豚 (>= 1.1.1) 咖啡轨 (~> 3.1.1) 黄瓜导轨 (>= 1.1.1) database_cleaner (>= 0.6.7) 设计(> = 1.4.7) factory_girl_rails (>= 1.2.0) 形式的 friendly_id (~> 4.0.0.beta14) 前端助手 地理编码器 地名 咆哮 后卫(> = 0.6.2) 保护捆绑器(> = 0.1.3) 保护黄瓜 (>= 0.6.1) 守卫-livereload (>= 0.3.0) 护栏 (>= 0.0.3) 守卫-rspec (>= 0.4.3) 哈姆 (>= 3.1.2) haml-rails (>= 0.3.4) jquery-rails 启动(> = 2.0.5) 嵌套形式! 回形针 (~> 2.4) 皮克 机架 (= 1.3.3) 导轨(= 3.1.1) rails-footnotes (>= 3.7) rb-fsevent 雷迪斯 redis 存储 rspec-rails (>= 2.6.1) sass-rails (~> 3.1.4) sqlite3 斯奎尔 转运轨道 丑陋的(> = 1.0.3) uuid工具

【问题讨论】:

  • 从这个 repo 中尝试 nested_form gem git://github.com/haines/nested_form.git
  • @MikhailNikalyukin 我使用该地址时仍然收到错误
  • 我已经放弃了这个,我正在转向github.com/nathanvda/cocoon,但我会留下这个问题并将赏金奖励给回答的人。在解决之前,其他人可能需要在未来得到答案。

标签: ruby-on-rails ruby-on-rails-3 ruby-on-rails-3.1 nested-forms formtastic


【解决方案1】:

semantic_form_for 更改为semantic_nested_form_for - 如“formtastic 支持”下的readme 中所述

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2011-11-02
    • 1970-01-01
    • 1970-01-01
    • 2011-08-25
    • 1970-01-01
    • 1970-01-01
    • 2011-12-23
    • 1970-01-01
    相关资源
    最近更新 更多