您使用哪个 Ruby on Rails 管理插件?为什么?不同管理宝石的优点和缺点是什么?
我们需要一个非常简单但安全的 Rails 管理插件。我们使用的是 2.x,但正在考虑移植到 3.x。
您使用哪个管理插件,为什么?别人的优点和缺点是什么?有一些可用的管理插件,我们希望在选择一个之前借鉴其他人的经验。
管理插件是指帮助我们管理应用程序的数据和用户的插件。
谢谢!
We need a dead simple, but secure, admin plugin for Rails. We're on 2.x but are considering a port to 3.x.
Which admin plugin do you use, and why? What are the pros and cons of others? There are a few admin plugins available, and we would like to draw on the experience of others before choosing one.
And by admin plugin, I mean a plugin to help us manage the data and users of the application.
Thanks!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(8)
这是目前最流行的一个: https://github.com/sferik/rails_admin
它是一个 Rails 引擎虽然不是插件,但它看起来很漂亮而且很有用。
This is currently the most popular one: https://github.com/sferik/rails_admin
It's a Rails engine rather than a plugin, but it's good looking and useful.
使用
Devise
和CanCan
创建自己的管理员不是更好吗?当然,这需要一些工作,但您将完全控制您的 admin/cms,并且众所周知,Devise 可以在整个 MVC 堆栈中提供身份验证。我见过的大多数方法都倾向于对管理区域进行命名空间。
Aren't you better off using
Devise
andCanCan
to create your own admin? Sure, it'll take some work, but you will have full control over your admin/cms and Devise is known to offer authentication across the entire MVC stack.Most of the approaches I've seen tend to namespace the admin area in particular.
尝试打字机
https://github.com/fesplugas/typus
它使用自己的身份验证/授权,这里是演示:< a href="http://demo.typuscms.com/admin" rel="nofollow">http://demo.typuscms.com/admin
Try Typus
https://github.com/fesplugas/typus
It uses own authentication/authorization, here are demo: http://demo.typuscms.com/admin
查看ActiveAdmin。有一个 Railscast。
Check out ActiveAdmin. There's a Railscast.
我建议您在railscasts 和authentication 下搜索。在那里你会发现(通过 Ryan Bates)从超级简单的“第 21 集”到上面提到的一切。
如果您花 1 小时观看来自此搜索的 12 个播客,您将能够更好地找到适合您需求的解决方案(基于此社区的良好反馈)。
祝你好运,让我们知道您选择哪一个。
I recommend you search under railscasts AND authentication. There you will find (via Ryan Bates) everything from the super simple "episode 21" to the ones mentioned above.
If you devote 1 hour to watching the 12 podcasts that come from this search, you will better be able to come up with a solution which is appropriate for your needs (based on the great feedback from this community).
Good luck and let us know which one you choose.
许多人(包括我)不喜欢使用 gem 进行身份验证,因为它对于应用程序来说太高级了;有时,为适合您的用例编写自己的代码会更好。
现在你可以去使用 devise、authlogic 等,但对我来说身份验证非常重要,如果我不完全理解这些宝石背后的原理,我倾向于远离(取决于我正在构建的应用程序)。
Many (me included) prefer not to use a gem for authentication because it is too high a feature for an app; it is sometimes better to code your own for your suited use case.
Now you could go and use devise, authlogic etc., but to me authentication is so important, and if I don't fully understand what is going behind these gems I tend to stay away (depending on the app I am building).
我本身不使用“管理”插件。我使用 declarative_authorization gem。
优点:
您获得的不仅仅是管理员/普通用户权限,您还可以定义自己的用户角色并明确定义谁可以做什么
您可以获得许多帮助器方法来定义只有某些用户可以执行的某些操作
它非常受欢迎,文档非常齐全,并且得到很好的支持
缺点:
I don't use an "admin" plugin perse. I use the declarative_authorization gem.
Pros:
you get more than just admin/normal user privileges, you get the ability to define your own user roles and explicitly define who can do what
you get a lot of helper methods for defining certain actions that only certain users can do
its very popular, very well documented, and very well supported
Cons:
ActiveAdmin 是最好的,并且可以轻松定制。
查看此链接ActiveAdmin
ActiveAdmin is the best and it will customize easily.
Look at this link ActiveAdmin