远程true在活动admin中不起作用语义_form_for助手

时间:2018-12-17 13:53:26

标签: javascript ruby-on-rails ruby ajax

我在仪表板中呈现的部分表单是: app / views / admin / dashboard / _form.html.erb

<%= semantic_form_for :club, url: admin_clubs_club_create_url, method: :post, remote: true, builder: ActiveAdmin::FormBuilder do |club| %>
    <%= club.inputs "Details" do %>
        <%= club.input :name, label: 'Club Name' %>
        <%= club.input :email, label: 'Club Admin Email', input_html: { value: '' } %>
        <%= club.inputs for: [:club_profile_attributes] do |ff| %>
            <%= ff.input :country_id, as: :select, collection: Country.get_id_and_name, include_blank: false %>
            <%= ff.input :logo, as: :file %>
            <%= ff.input :email, label: 'Club Email' %>
            <%= ff.input :phone_number_1, label: 'Phone Number' %>
        <% end %>
        <%= club.actions %>
    <% end %>
<% end %>

我创建了club_create动作并在clubs控制器中使用了它,但是单击“提交”按钮时未触发js请求

0 个答案:

没有答案