Formtastic输出一个数字

时间:2021-12-05 15:57:08

I have this form

我有这种形式

- semantic_form_for :qualification,  :url => { :controller => 'qualifications', :action => 'add_students' } do |form|
- form.inputs do
  = form.input :name, :label => "Course Title"
  = form.input :course_type, :collection => Qualification::COURSE_TYPES
  = form.input :graduate_date, :label => "Course Start Date", :start_year => pdc_start_year, :end_year => 1972, :discard_day => true
  = form.input :location, :label => "Course Location"
  = form.semantic_fields_for :user do |student|
    = student.input :first_name
    = student.input :last_name
= form.submit 'Add Students'

and it creates before the button this

它在按钮之前创建

1

1

I see this 1 generated but I would like to remove it

我看到这个1生成了,但我想删除它

1 个解决方案

#1


1  

Just guessing here that you're using rails 2?

猜猜你用的是rails 2?

= form.semantic_fields_for :user do |student|

should be

应该是

- form.semantic_fields_for :user do |student|

#1


1  

Just guessing here that you're using rails 2?

猜猜你用的是rails 2?

= form.semantic_fields_for :user do |student|

should be

应该是

- form.semantic_fields_for :user do |student|