Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

active_admin_multi_upload

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

active_admin_multi_upload

  • 0.1.0
  • Rubygems
  • Socket score

Version published
Maintainers
1
Created
Source

ActiveAdminMultiUpload

Support for multiple image upload for a nested resource in ActiveAdmin

This gem was built to work with Carrierwave & ActiveAdmin, and is based on the excellent jquery-fileupload-system.

ActiveAdminMultiUpload is a version of jquery-fileupload-ui built to work with nested objects and ActiveAdmin 1.0. It supports all major features including file-previews and progress bars, and has been built so as to have the simplest implentation possible. It has been tested with Rails 4.0.2 and Ruby 2.1.0

Getting Started

Carrierwave

This gem relies on Carrierwave to work. If you are unfamiliar with Carrierwave then I recommend have a look through it before using this gem. You can also check out This Railscast by Ryan Bates to help you get started.

Installation

Add the gem to your Gemfile

gem "active_admin_multi_upload"

and then run bundle install

Setup

For the sake of simplification for all examples below I am going to use the sample data.

  • Picture will be the model that has an uploader associated with its :image attribute
  • Gallery has many :pictures

You can also assume the @gallery refers to the current gallery that we are creating/editing.

Substitute these with your own models and associations

Allow the Params

In /admin/gallery.rb add permit_params picture_ids: []

Add the uploader

Within your form render the active_admin_multi_upload/upload_form

<%= f.inputs "Pictures" do %>
  <%= render "active_admin_multi_upload/upload_form", :resource => @gallery, :association => "pictures", attribute: "image" %>
<% end %>

Options

This project rocks and uses MIT-LICENSE.

FAQs

Package last updated on 22 May 2015

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc