user1066183
user1066183

Reputation: 2584

rails_admin gem only allow edit action for certain model

i'm using rails_admin gem. In admin page I have a model called Staff. Is possible only allow edit action for this model? I want to disable new,destroy ect ect.

Upvotes: 1

Views: 457

Answers (1)

Srikanth Venugopalan
Srikanth Venugopalan

Reputation: 9049

You can use CanCan to configure the authorization in Rails Admin. This wiki tells you how to setup possible verbs for each model.

You could also hack the views to set visibility:hidden etc, but I would prefer the CanCan way.

Upvotes: 1

Related Questions