1
我在设计中有两个角色。第一个是管理员,第二个是普通的用户角色。 现在我想在某些情况下让这两个组与之前的过滤器具有相同的权限。设计角色:不同的角色,在某些情况下相同的权利
这是如何工作的?
我:
before_filter :authenticate_user!, :only => [:new, :create]
before_filter :authenticate_admin!, :only => [:new, :create, :edit, :update, :destroy]
但现在只有一个用户可以:新:创造... ...管理员没有.. 我在这里做什么?
感谢, Mattherick
感谢rspeicher!我想过几乎一样,但现在它工作。 – Mattherick 2010-04-25 15:56:17