加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 百科 > 正文

ruby-on-rails – bootstrap_form错误未定义方法

发布时间:2020-12-17 04:27:29 所属栏目:百科 来源:网络整理
导读:1-我安装了gem bootstrap_form 2-我在application.css中写道,行* =在* /之前需要bootstrap_form 3-在我的html.erb中 %= bootstrap_form_for(@guardian,:url = student_guardians_path(@student),html: { class: 'form-horizontal' },method: :post) do |f| %
1-我安装了gem bootstrap_form
2-我在application.css中写道,行* =在* /之前需要bootstrap_form
3-在我的html.erb中
<%= bootstrap_form_for(@guardian,:url => student_guardians_path(@student),html: { class: 'form-horizontal' },method: :post) do |f| %>

我收到以下错误:undefined methodbootstrap_form_for’for#<#:0xb31a80c>`

解决方法

我得到了同样的错误.通过替换修复它
gem 'bootstrap-form'

通过

gem 'bootstrap_form'

在我的gemfile中

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读