0
我想把一個fileUploader上傳一些文件到數據庫。CarrierWave在rails_admin
我按照rails_admin wiki上的步驟操作,但無法使其工作。具體來說,fileUploader不會出現在視圖中。誰能提供建議?
class Peca < ActiveRecord::Base
mount_uploaders :documento, DocumentoUploader
belongs_to :cliente
has_many :referencias, class_name: "Peca", foreign_key: "referencia_peca_id"
belongs_to :referencia_peca, class_name: "Peca"
RailsAdmin.config do |config|
config.model 'Peca' do
list do
field :nome
field :created_at
end
update do
exclude_fields :referencias
end
create do
exclude_fields :referencias
end
end
end
end
你也有一個錯字,它應該是'mount_uploader',而不是'mount_uploder'。 –