No commit activity in last 3 years
No release in over 3 years
Mass file uploads via jQuery-File-Upload for Rails Admin
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
 Dependencies

Development

~> 1.10
~> 10.0
 Project Readme

RailsAdminUploader

Mass file uploads via jQuery-File-Upload for Rails Admin

Installation

Add this line to your application's Gemfile:

gem 'rails_admin_uploader'

And then execute:

$ bundle

Or install it yourself as:

$ gem install rails_admin_uploader

Mount the gem's engine. Add to config/routes.rb:

mount RailsAdminUploader::Engine => '/ra_uploader', as: 'rails_admin_uploader'

Add this line to app/assets/javascripts/rails_admin/custom/ui.coffee

#= require rails_admin_uploader

Create this file if it doesn't exist in your project.

Add this line to app/assets/stylesheets/rails_admin/custom/theming.sass

@import rails_admin_uploader

Create this file if it doesn't exist in your project.

Usage

Configure your models:

class Obj has_many :images has_many :plans include RailsAdminUploader::Base rails_admin_uploader :images, :plans # add a string field :ra_token to DB (required) rails_admin do edit do field :image, :rails_admin_uploader field :plans, :rails_admin_uploader end end end class Image belongs_to :obj include RailsAdminUploader::Asset

# add a string field :ra_token to DB (required)
# add an image field :image to DB (required)
# add an integer field :sort to DB (optional)
# add a boolean field :enabled to DB (optional)

end

Set up CanCan (required)

Contributing

Bug reports and pull requests are welcome on GitHub.

License

Somewhat based on rails-uploader Copyright (c) 2013 Fodojo, released under the MIT license

The gem is available as open source under the terms of the MIT License. Copyright (c) 2015 glebtv, released under the MIT license