将新管理员添加到活动管理员 [英] Adding New Admins to Active Admin

查看:22
本文介绍了将新管理员添加到活动管理员的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在为我的用户使用设计.我最近安装了 rails Active Admin gem,一切运行良好.

I am using devise for my users. I recently installed the rails Active Admin gem, everything is working beautifully.

但是我不知道如何添加新的管理员用户.我可以看到活动管理员在数据库中使用用户 admin@example.com 创建了一个 admin_user 表,我用它来登录界面.

However I can't figure out how to add a new admin users. I can see that active admin created an admin_user table in the db with a user admin@example.com, which I use to log in to the interface.

我尝试将 admin_user 添加为资源,这样我只需单击活动管理界面中的添加管理员用户"按钮即可添加新用户,但这似乎不起作用.

I tried adding admin_user as a resource so that I can just click the Add Admin User button within the active admin interface to add a new user, however that does not seem to work.

推荐答案

brian 说的很完美http://net.tutsplus.com/tutorials/ruby/create-beautiful-administration-interfaces-with-active-admin/

What brian said works perfectly http://net.tutsplus.com/tutorials/ruby/create-beautiful-administration-interfaces-with-active-admin/

AdminUser.create!(:email => 'admin@example.com', :password => 'password', :password_confirmation => 'password')

这篇关于将新管理员添加到活动管理员的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆