I wan't to add image upload field inside active admin interface.This is the view where I want to be able get photo upload
I tried some earlier suggestions From here
ActiveAdmin.register Product do
form :html => { :multipart=>true } do |f|
f.inputs :new_product do
f.input :name
f.input :price
f.input :category
f.input :description
f.has_many :prod_images do |p|
p.input :photo, :as => :file, :label => "Image",:hint => p.template.image_tag(p.object.photo.url(:thumb))
p.input :_destroy, :as=>:boolean, :required => false, :label => 'Remove image'
end
end
f.buttons
end
Using this example I got such error
undefined method `klass' for nil:NilClass
It says that error is from here app/views/active_admin/resource/new.html.arb where line #1 raised
but how can I access that file, because in explorer it is not showing up?
Thanks