ejholmes/active_admin_editor — pull request #41 by codingluke (2013-07-08 17:02:35+00:00)
Title: Fileupload custom action

Hi @ejholmes

Here another feature. I just added the possibility also to provide an custom uploader action. I added this because I like to scale down images before they gets saved at S3. I just don't believe enough in the editors that they don't put a 3MB Image in. All the tests still run and new ones are added.

```ruby
ActiveAdmin::Editor.configure do |config|
config.uploader_action_path = '/admin/posts/upload_image'
end
```

example action
```ruby
collection_action :upload_image, :method => :post do
img = ImageUploader.new(image: params[:file])
img.upload

# IMPORTANT the image url must be set as the headers location porperty
render json: {location: img.remote_url} , location: img.remote_url
end
```

Cheers