Use Carrierwave with Active Admin?

667 views
Skip to first unread message

Heinz Strunk

unread,
Nov 25, 2011, 7:10:16 AM11/25/11
to rubyonra...@googlegroups.com
Hey,

did any of you guys manage to get Active Admin with Carrierwave working?

When I installed AA everything worked fine but the image file upload
fields were plain text fields so added following:
ActiveAdmin.register Club do
form do |f|
f.inputs "Club" do
f.input :league
f.input :name
f.input :image, :as => :file
f.input :approved
end
f.buttons
end
end

Now it's displayed as a file upload field and I can select a file but
after I submitted the form nothing changed. There's still no image and
the image field is empty. Anyone knows what else to do to get it
working?

--
Posted via http://www.ruby-forum.com/.

Furqan Asghar

unread,
Sep 16, 2014, 2:04:44 AM9/16/14
to rubyonra...@googlegroups.com
hey, have you managed to find the solution. i'm facing the same issue and i've been struggling to find a solution to this.

Heinz Strunk

unread,
Sep 16, 2014, 3:58:46 AM9/16/14
to rubyonra...@googlegroups.com
The current versions work for me.

Example:
form :html => {:multipart => true} do |f|
f.inputs "Blog" do
f.input :blog, :as => :select
f.input :video_link
f.input :image, :as => :file, :hint =>
f.template.image_tag(f.object.image.url(:thumb))
f.input :image_cache, :as => :hidden
if f.object.image?
f.input :remove_image, :as => :boolean
end
end
end
Reply all
Reply to author
Forward
0 new messages