AdministrateFieldPassword
All you need to integrate Password with Administrate.
Installation
Add this line to your application's Gemfile:
gem 'administrate-field-password'
And then execute:
$ bundle
Usage
In your Dashboard ATTRIBUTE_TYPES
use the field type PasswordField
. i.e.
ATTRIBUTE_TYPES = {
images_files: FieldPassword
}
By default all Password
options are false, you can set them to true like this:
ATTRIBUTE_TYPES = {
images_files: FieldPassword.(direct: true, presigned: true, multiple: true)
}
If in you are displaying the password field on your forms, add this on you UserController
module Admin
class UsersController < Admin::ApplicationController
def update
params[:user].delete(:password) if params[:user][:password].blank?
super
end
end
end
Contributing
Bug reports and pull requests are welcome on GitHub at https://github.com/DisruptiveAngels/administrate-field-password.