app/admin/products.rb 内にこのコードがあります。一度に 1 つの入力フィールド (最後にリストされたもの) しか表示されないか、送信ボタンだけが表示されるという問題があります。いくつかの構文ミスが原因でしょうか? しかし、エラーメッセージはありません。
ActiveAdmin.register Product do
f.input :name,:label => "Name"
f.input :photo, :as => :file
f.input :category, :collection => @category
f.input :manufacturer, :collection => @manufacturer
f.actions do
f.action :submit, :button_html => { :class => "primary", :disable_with => 'Wait...' }
end
end
end
製品モデルはこんな感じ
attr_accessible :category_id, :description, :manufacturer_id, :name, :photo
extend FriendlyId
has_attached_file :photo,
:styles => {
:thumb=> "100x100#",
:large => "290x170",
:medium=> "120x120"}
friendly_id :name, use: [:slugged, :history]
belongs_to :manufacturer
belongs_to :category