I use Active admin as my rails application backend. I want to make a file upload. How can I accomplish this functionality?
相关问题
- Question marks after images and js/css files in ra
- Using :remote => true with hover event
- Eager-loading association count with Arel (Rails 3
- How to specify memcache server to Rack::Session::M
- Why am I getting a “C compiler cannot create execu
相关文章
- Ruby using wrong version of openssl
- Right way to deploy Rails + Puma + Postgres app to
- AWS S3 in rails - how to set the s3_signature_vers
- Difference between Thread#run and Thread#wakeup?
- how to call a active record named scope with a str
- How to add a JSON column in MySQL with Rails 5 Mig
- “No explicit conversion of Symbol into String” for
- form_for wrong number of arguments in rails 4
Got it worked for Rails 4.1 and Paperclip 4.1:
Model
Admin Model
In latest Version of ActiveAdmin & Rails 4 for displaying the file field we need to use the below code
Previously we used f.input :uploads, :as => :file
I found a way to use Paperclip with Active Admin.
I added this code in my model "Event" :
And i did this for my admin model :
To use it on the index page, you have to use :
I'm using the rails 3.0.1 and the following code
return a string. After search a solution, i found it.
Send direct the object, will return a image to the html