我尝试将一个fileUploader上传到数据库。
我按照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