activeadmin


Creating a new admin user in activeadmin


I'm using active admin on rails 4, I white-listed the parameters for admin users in the controller using:
ActiveAdmin.register AdminUser do
controller do
def permitted_params
params.permit(:admin_user => [:email, :password, :password_confirmation])
end
end
end
but when I try to add a new user, I get the error "cannot be blank" on the email and password fields. The logs read the following:
Unpermitted parameters: utf8, authenticity_token, commit
Unpermitted parameters: utf8, authenticity_token, admin_user, commit
Is there something I'm missing?
I was also facing the same issue.
Changing
params.permit(:admin_user => [:email, :password, :password_confirmation])
to
params.permit(:user => [:email, :password, :password_confirmation])
solved the issue. devise in active admin creates model with name user and in active admin user model, its mentioned as admin_user.
In my case it was happenning because i had a validation for an associated record on that model. Disabling that validation fixes it, will need to check how to disable validations for active admin only.

Related Links

ActiveAdmin limiting has_many association retrieval?
In Active Admin, all of my models form views seem to refer just one of those models
Rails ActiveAdmin : How to place filters on the top in index action
change css styles of active admin
Active admin install with Rails 4
ActiveAdmin won't save has many and belongs to many field
Truncate data in ActiveAdmin index page
Active Admin: how to set filter label dynamically
How to add an HTML-class to an ActiveAdmin index table
How to use modules to split very long code in active admin?
Downloading all records of a paginated resource in ActiveAdmin
Can you use the Form() command in ActiveAdmin in the content of a custom page?
CollectionAction route being skipped, action treated as ID
Possible to “split” an ActiveAdmin resource between multiple menu items?
Rails: activeadmin, undefined method `per' for #<ActiveRecord::Relation:0x4d15ee0>
Active Admin create form in register_page

Categories

HOME
macos-sierra
class
android-fragments
loopbackjs
hdfs
consul
implicit-conversion
visualforce
wagtail
angular2-template
tup
siesta
sap-fiori
jquery-file-upload
freertos
smartgwt
spring-jpa
complexity-theory
google-tasks-api
nullreferenceexception
spam
bazaar
data-type-conversion
weex
bsd
uislider
qa
software-packaging
running-object-table
npoi
bonita
boolean-logic
python-2.x
wampsharp
cucumber-junit
shapeless
kendo-listview
polyml
pdfminer
stackpanel
identify
aurelia-cli
microsoft-ui-automation
reset
sbjson
slideshow
1wire
permission-denied
nomad
audio-converter
.net-micro-framework
libreoffice-writer
md5-file
winston
solr-query-syntax
android-sharing
android-mediarecorder
dblink
word-2016
boost-compute
seccomp
cdo.message
dojo-build
deferred-rendering
unsigned
utf-16
gridbaglayout
flipclock
certificate-authority
wikimedia-commons
lovefield
perceptron
html.actionlink
deque
text-align
lifetime
adhoc-polymorphism
datagridcomboboxcolumn
cout
tabris
lmax
full-text-indexing
webautomation
neo4jphp
roxy-fileman
typesafe-stack
strdup
autonumber
illuminate-container
progress-db
xsd2code
coalesce
arrow
radscheduler
qt-mobility
mediacontroller
raw-data
rawcontacts
spring-modules
jvm-bytecode
synthesizer

Resources

Database Users
RDBMS discuss
Database Dev&Adm
javascript
java
csharp
php
android
javascript
java
csharp
php
python
android
jquery
ruby
ios
html
Mobile App
Mobile App
Mobile App