1

使用 ActiveAdmin 在 Formtastic 中为Ice_Cube gem使用select_recurring表单助手时,我收到一个错误。unable to find input class for select_recurring

  form do |f|
    #Debugging
    f.semantic_errors *f.object.errors.keys

    f.inputs do
      f.input :title
      f.input :description,  :hint => "Full description for the event"
      f.input :short_description, :hint => "Shot description for the event that will be displayed as a thumbnail"
      f.input :published
      f.input :event_date
      f.input :recurring_rule, :as => :select_recurring
    end

    f.actions
  end

直接访问它(如下)适用于重复计划元素,但会破坏所有其余的形式f.input元素。

f.select_recurring :recurring_schedule

如何加入select_recurringActiveAdmin?

4

1 回答 1

1

为我工作(AA 1.0.0.pre1)

form do |f|
  f.inputs do
  #...
    li do
      f.label :recurring_rule_column
      f.select_recurring :recurring_rule_column, nil, :allow_blank => true
    end
  #...
  end
  f.submit
end
于 2015-07-10T15:50:21.470 回答